File tree Expand file tree Collapse file tree 6 files changed +67
-2
lines changed Expand file tree Collapse file tree 6 files changed +67
-2
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ $ header = <<<'TAG'
4
+ This file is part of nochso/html-compress-twig.
5
+
6
+ @copyright Copyright (c) 2015 Marcel Voigt <mv@noch.so>
7
+ @license https://github.com/nochso/html-compress-twig/blob/master/LICENSE ISC
8
+ @link https://github.com/nochso/html-compress-twig
9
+ TAG;
10
+
11
+ $ gitIgnoreLines = array_map (function ($ line ) {
12
+ return rtrim ($ line , "\r\n\\/ " );
13
+ }, file ('.gitignore ' ));
14
+
15
+ $ finder = Symfony \CS \Finder \DefaultFinder::create ()
16
+ ->in (__DIR__ )
17
+ ->exclude ($ gitIgnoreLines );
18
+
19
+ \Symfony \CS \Fixer \Contrib \HeaderCommentFixer::setHeader ($ header );
20
+ return \Symfony \CS \Config \Config::create ()
21
+ ->level (\Symfony \CS \FixerInterface::SYMFONY_LEVEL )
22
+ ->fixers ([
23
+ '-psr0 ' , // Does not play well with PSR-4
24
+ 'concat_with_spaces ' ,
25
+ '-concat_without_spaces ' ,
26
+ '-empty_return ' ,
27
+ '-phpdoc_no_empty_return ' ,
28
+ '-return ' ,
29
+ '-pre_increment ' ,
30
+ 'header_comment ' ,
31
+ ])
32
+ ->finder ($ finder );
Original file line number Diff line number Diff line change 20
20
"wyrihaximus/html-compress" : " ^1.1" ,
21
21
"twig/twig" : " ^1.0" ,
22
22
"phpunit/phpunit" : " ^4.8|^5.0"
23
+ },
24
+ "suggests" : {
25
+ "fabpot/php-cs-fixer" : " Fix coding standards in PHP code"
23
26
}
24
27
}
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ /*
4
+ * This file is part of nochso/html-compress-twig.
5
+ *
6
+ * @copyright Copyright (c) 2015 Marcel Voigt <mv@noch.so>
7
+ * @license https://github.com/nochso/html-compress-twig/blob/master/LICENSE ISC
8
+ * @link https://github.com/nochso/html-compress-twig
9
+ */
10
+
3
11
namespace nochso \HtmlCompressTwig ;
4
12
5
13
use Twig_Environment ;
8
16
/**
9
17
* Extension.
10
18
*
11
- * TODO Pass parser to constructor instead
12
- *
13
19
* @author Marcel Voigt <mv@noch.so>
14
20
* @copyright Copyright (c) 2015 Marcel Voigt <mv@noch.so>
15
21
*/
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ /*
4
+ * This file is part of nochso/html-compress-twig.
5
+ *
6
+ * @copyright Copyright (c) 2015 Marcel Voigt <mv@noch.so>
7
+ * @license https://github.com/nochso/html-compress-twig/blob/master/LICENSE ISC
8
+ * @link https://github.com/nochso/html-compress-twig
9
+ */
10
+
3
11
namespace nochso \HtmlCompressTwig ;
4
12
5
13
use Twig_Node ;
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ /*
4
+ * This file is part of nochso/html-compress-twig.
5
+ *
6
+ * @copyright Copyright (c) 2015 Marcel Voigt <mv@noch.so>
7
+ * @license https://github.com/nochso/html-compress-twig/blob/master/LICENSE ISC
8
+ * @link https://github.com/nochso/html-compress-twig
9
+ */
10
+
3
11
namespace nochso \HtmlCompressTwig ;
4
12
5
13
use Twig_Token ;
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ /*
4
+ * This file is part of nochso/html-compress-twig.
5
+ *
6
+ * @copyright Copyright (c) 2015 Marcel Voigt <mv@noch.so>
7
+ * @license https://github.com/nochso/html-compress-twig/blob/master/LICENSE ISC
8
+ * @link https://github.com/nochso/html-compress-twig
9
+ */
10
+
3
11
namespace nochso \HtmlCompressTwig \test ;
4
12
5
13
use nochso \HtmlCompressTwig \Extension ;
You can’t perform that action at this time.
0 commit comments