File tree Expand file tree Collapse file tree 3 files changed +37
-1
lines changed
Expand file tree Collapse file tree 3 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 77/puli.json
88/box.json
99/.puli
10+ /.php_cs.cache
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ require_once __DIR__ .'/vendor/autoload.php ' ;
4+
5+ use SLLH \StyleCIBridge \ConfigBridge ;
6+ use Symfony \CS \Fixer \Contrib \HeaderCommentFixer ;
7+
8+ $ header = <<<EOF
9+ This file is part of the puli/cli package.
10+
11+ (c) Bernhard Schussek <[email protected] > 12+
13+ For the full copyright and license information, please view the LICENSE
14+ file that was distributed with this source code.
15+ EOF ;
16+
17+ // PHP-CS-Fixer 1.x
18+ if (method_exists ('Symfony\CS\Fixer\Contrib\HeaderCommentFixer ' , 'getHeader ' )) {
19+ HeaderCommentFixer::setHeader ($ header );
20+ }
21+
22+ $ config = ConfigBridge::create ();
23+ $ config ->setUsingCache (true );
24+
25+ // PHP-CS-Fixer 2.x
26+ if (method_exists ($ config , 'setRules ' )) {
27+ $ config
28+ ->setRules (array_merge ($ config ->getRules (), array (
29+ 'header_comment ' => array ('header ' => $ header )
30+ )))
31+ ;
32+ }
33+
34+ return $ config ;
Original file line number Diff line number Diff line change 2525 "require-dev" : {
2626 "phpunit/phpunit" : " ^4.6" ,
2727 "sebastian/version" : " ^1.0.1" ,
28- "symfony/filesystem" : " ^2.3|^3.0"
28+ "symfony/filesystem" : " ^2.3|^3.0" ,
29+ "sllh/php-cs-fixer-styleci-bridge" : " ^2.1"
2930 },
3031 "autoload" : {
3132 "psr-4" : {
You can’t perform that action at this time.
0 commit comments