Skip to content

Commit 2d42d5a

Browse files
Updates
1 parent e836807 commit 2d42d5a

15 files changed

+73
-28
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/tests export-ignore
44
/.gitattributes export-ignore
55
/.gitignore export-ignore
6+
/.php_cs export-ignore
67
/.travis.yml export-ignore
78
/phpunit.xml.dist export-ignore
89
/CHANGELOG.md export-ignore

.php_cs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
$fixers = array(
4+
'psr0',
5+
'encoding',
6+
'short_tag',
7+
'braces',
8+
'elseif',
9+
'eof_ending',
10+
'function_declaration',
11+
'indentation',
12+
'line_after_namespace',
13+
'linefeed',
14+
'lowercase_constants',
15+
'lowercase_keywords',
16+
'multiple_use',
17+
'php_closing_tag',
18+
'trailing_spaces',
19+
'duplicate_semicolon',
20+
'extra_empty_lines',
21+
'include',
22+
'multiline_array_trailing_comma',
23+
'namespace_no_leading_whitespace',
24+
'new_with_braces',
25+
'object_operator',
26+
'operators_spaces',
27+
'phpdoc_params',
28+
'single_array_no_trailing_comma',
29+
'spaces_before_semicolon',
30+
'spaces_cast',
31+
'standardize_not_equal',
32+
'ternary_spaces',
33+
'unused_use',
34+
'whitespacy_lines',
35+
'multiline_spaces_before_semicolon',
36+
'ordered_use',
37+
'remove_lines_between_uses',
38+
);
39+
40+
return Symfony\CS\Config\Config::create()->fixers($fixers)
41+
->finder(Symfony\CS\Finder\DefaultFinder::create()->in(__DIR__));

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ before_script:
1313
script:
1414
- bash -c 'if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then vendor/bin/phpunit; fi;'
1515
- bash -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi;'
16+
- bash -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then vendor/bin/phpcs src -p --standard=psr2 --ignore=*.blade.php; fi;'
17+
- bash -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then vendor/bin/php-cs-fixer --dry-run -vv fix; fi;'
1618

17-
after_success:
19+
after_script:
1820
- bash -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi;'
1921
- bash -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi;'

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ CHANGE LOG
55
## V2.1.3 (Upcoming)
66

77
* Improved the test suite
8+
* Added cs fixers to the test suite
9+
* Improved the docs
810

911

1012
## V2.1.2 (12/08/2014)

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
Laravel HTMLMin
22
===============
33

4+
Laravel HTMLMin was created by, and is maintained by [Graham Campbell](https://github.com/GrahamCampbell), and is a simple HTML minifier for [Laravel 4.2](http://laravel.com). It utilises Mr Clay's [Minify](https://github.com/mrclay/minify) package to minify entire responses, but can also minify blade at compile time. Feel free to check out the [change log](CHANGELOG.md), [releases](https://github.com/GrahamCampbell/Laravel-HTMLMin/releases), [license](LICENSE.md), [api docs](http://docs.grahamjcampbell.co.uk), and [contribution guidelines](CONTRIBUTING.md).
45

5-
[![Build Status](https://img.shields.io/travis/GrahamCampbell/Laravel-HTMLMin/master.svg?style=flat-square)](https://travis-ci.org/GrahamCampbell/Laravel-HTMLMin)
6-
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/GrahamCampbell/Laravel-HTMLMin.svg?style=flat-square)](https://scrutinizer-ci.com/g/GrahamCampbell/Laravel-HTMLMin/code-structure)
7-
[![Quality Score](https://img.shields.io/scrutinizer/g/GrahamCampbell/Laravel-HTMLMin.svg?style=flat-square)](https://scrutinizer-ci.com/g/GrahamCampbell/Laravel-HTMLMin)
8-
[![Software License](https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg?style=flat-square)](LICENSE.md)
9-
[![Latest Version](https://img.shields.io/github/release/GrahamCampbell/Laravel-HTMLMin.svg?style=flat-square)](https://github.com/GrahamCampbell/Laravel-HTMLMin/releases)
10-
11-
12-
### Looking for a laravel 5 compatable version?
13-
14-
Checkout the [master branch](https://github.com/GrahamCampbell/Laravel-HTMLMin/tree/master), installable by requiring `"graham-campbell/htmlmin": "~3.0"`.
15-
16-
17-
## Introduction
6+
![Laravel HTMLMin](https://cloud.githubusercontent.com/assets/2829600/4432281/a97a7ec2-468c-11e4-947b-528578c3211e.PNG)
187

19-
Laravel HTMLMin was created by, and is maintained by [Graham Campbell](https://github.com/GrahamCampbell), and is a simple HTML minifier for [Laravel 4.2](http://laravel.com). It utilises Mr Clay's [Minify](https://github.com/mrclay/minify) package to minify entire responses, but can also minify blade at compile time. Feel free to check out the [change log](CHANGELOG.md), [releases](https://github.com/GrahamCampbell/Laravel-HTMLMin/releases), [license](LICENSE.md), [api docs](http://docs.grahamjcampbell.co.uk), and [contribution guidelines](CONTRIBUTING.md).
8+
<p align="center">
9+
<a href="https://travis-ci.org/GrahamCampbell/Laravel-HTMLMin"><img src="https://img.shields.io/travis/GrahamCampbell/Laravel-HTMLMin/master.svg?style=flat-square" alt="Build Status"></img></a>
10+
<a href="https://scrutinizer-ci.com/g/GrahamCampbell/Laravel-HTMLMin/code-structure"><img src="https://img.shields.io/scrutinizer/coverage/g/GrahamCampbell/Laravel-HTMLMin.svg?style=flat-square" alt="Coverage Status"></img></a>
11+
<a href="https://scrutinizer-ci.com/g/GrahamCampbell/Laravel-HTMLMin"><img src="https://img.shields.io/scrutinizer/g/GrahamCampbell/Laravel-HTMLMin.svg?style=flat-square" alt="Quality Score"></img></a>
12+
<a href="LICENSE.md"><img src="https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg?style=flat-square" alt="Software License"></img></a>
13+
<a href="https://github.com/GrahamCampbell/Laravel-HTMLMin/releases"><img src="https://img.shields.io/github/release/GrahamCampbell/Laravel-HTMLMin.svg?style=flat-square" alt="Latest Version"></img></a>
14+
</p>
2015

2116

2217
## Installation
@@ -33,6 +28,10 @@ You can register the HTMLMin facade in the `aliases` key of your `app/config/app
3328

3429
* `'HTMLMin' => 'GrahamCampbell\HTMLMin\Facades\HTMLMin'`
3530

31+
#### Looking for a laravel 5 compatable version?
32+
33+
Checkout the [master branch](https://github.com/GrahamCampbell/Laravel-HTMLMin/tree/master), installable by requiring `"graham-campbell/htmlmin": "~3.0"`.
34+
3635

3736
## Configuration
3837

src/HTMLMinServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public function provides()
218218
'htmlmin.css',
219219
'htmlmin.html',
220220
'htmlmin.blade',
221-
'htmlmin.compiler'
221+
'htmlmin.compiler',
222222
);
223223
}
224224
}

src/Minifiers/BladeMinifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function render($value)
6464
"/\r/" => '',
6565
"/\n/" => '',
6666
"/\t/" => ' ',
67-
"/ +/" => ' '
67+
"/ +/" => ' ',
6868
);
6969

7070
$value = preg_replace(array_keys($replace), array_values($replace), $value);

src/Minifiers/HtmlMinifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function render($value)
7171
'jsMinifier' => function ($js) {
7272
return $this->js->render($js);
7373
},
74-
'jsCleanComments' => true
74+
'jsCleanComments' => true,
7575
);
7676

7777
return Minify_HTML::minify($value, $options);

src/config/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@
6666
|
6767
*/
6868

69-
'live' => false
69+
'live' => false,
7070

7171
);

tests/Compilers/MinifyCompilerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
namespace GrahamCampbell\Tests\HTMLMin\Compilers;
1818

19-
use Mockery;
2019
use GrahamCampbell\HTMLMin\Compilers\MinifyCompiler;
2120
use GrahamCampbell\TestBench\AbstractTestCase;
21+
use Mockery;
2222

2323
/**
2424
* This is the minify compiler test class.

tests/Facades/HTMLMinTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
namespace GrahamCampbell\Tests\HTMLMin\Facades;
1818

19-
use GrahamCampbell\Tests\HTMLMin\AbstractTestCase;
2019
use GrahamCampbell\TestBench\Traits\FacadeTestCaseTrait;
20+
use GrahamCampbell\Tests\HTMLMin\AbstractTestCase;
2121

2222
/**
2323
* This is the htmlmin facade test class.

tests/Functional/FilterEnabledTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testNewSetup()
4141

4242
$this->app['router']->get('htmlmin-test-route', array('after' => 'htmlmin', function () {
4343
return $this->app['view']->make('stubs::test');
44-
}));
44+
}, ));
4545

4646
$actual = $this->call('GET', 'htmlmin-test-route')->getContent();
4747

tests/HTMLMinTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616

1717
namespace GrahamCampbell\Tests\HTMLMin;
1818

19-
use Mockery;
20-
use Illuminate\Http\Response;
21-
use Illuminate\Http\RedirectResponse;
2219
use GrahamCampbell\HTMLMin\HTMLMin;
2320
use GrahamCampbell\TestBench\AbstractTestCase as AbstractTestBenchTestCase;
21+
use Illuminate\Http\RedirectResponse;
22+
use Illuminate\Http\Response;
23+
use Mockery;
2424

2525
/**
2626
* This is the htmlmin test class.
@@ -37,7 +37,7 @@ public function methodProvider()
3737
array('blade', 'getBladeMinifier'),
3838
array('css', 'getCssMinifier'),
3939
array('js', 'getJsMinifier'),
40-
array('html', 'getHtmlMinifier')
40+
array('html', 'getHtmlMinifier'),
4141
);
4242
}
4343

tests/Minifiers/BladeMinifierTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function tagProvider()
4646
return array(
4747
array('textarea'),
4848
array('pre'),
49-
array('code')
49+
array('code'),
5050
);
5151
}
5252

tests/Minifiers/HtmlMinifierTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
namespace GrahamCampbell\Tests\HTMLMin\Minifiers;
1818

19-
use Mockery;
2019
use GrahamCampbell\HTMLMin\Minifiers\HtmlMinifier;
2120
use GrahamCampbell\TestBench\AbstractTestCase;
21+
use Mockery;
2222

2323
/**
2424
* This is the html minifier test class.

0 commit comments

Comments
 (0)