File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22
3- require_once ' . /vendor/autoload.php ' ;
3+ require __DIR__ . ' /vendor/sllh/php-cs-fixer-styleci-bridge /autoload.php ' ;
44
55use SLLH \StyleCIBridge \ConfigBridge ;
66use Symfony \CS \Fixer \Contrib \HeaderCommentFixer ;
@@ -14,8 +14,18 @@ For the full copyright and license information, please view the LICENSE
1414file that was distributed with this source code.
1515EOF ;
1616
17- HeaderCommentFixer::setHeader ($ header );
17+ // PHP-CS-Fixer 1.x
18+ if (method_exists ('Symfony\CS\Fixer\Contrib\HeaderCommentFixer ' , 'getHeader ' )) {
19+ HeaderCommentFixer::setHeader ($ header );
20+ }
1821
19- return ConfigBridge::create ()
20- ->setUsingCache (true )
21- ;
22+ $ config = ConfigBridge::create ();
23+
24+ // PHP-CS-Fixer 2.x
25+ if (method_exists ($ config , 'setRules ' )) {
26+ $ config ->setRules (array_merge ($ config ->getRules (), array (
27+ 'header_comment ' => array ('header ' => $ header )
28+ )));
29+ }
30+
31+ return $ config ;
You can’t perform that action at this time.
0 commit comments