File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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+ /** @var \Composer\Autoload\ClassLoader $loader */
4+ $ loader = require __DIR__ .'/vendor/autoload.php ' ;
5+
6+ $ loader ->unregister ();
7+ $ loader ->addPsr4 ('SLLH \\StyleCIBridge \\' , __DIR__ .'/vendor/sllh/php-cs-fixer-styleci-bridge ' );
8+ $ loader ->register ();
9+
10+ use SLLH \StyleCIBridge \ConfigBridge ;
11+ use Symfony \CS \Fixer \Contrib \HeaderCommentFixer ;
12+
13+ $ header = <<<EOF
14+ This file is part of the puli/cli package.
15+
16+ (c) Bernhard Schussek <bschussek@gmail.com>
17+
18+ For the full copyright and license information, please view the LICENSE
19+ file that was distributed with this source code.
20+ EOF ;
21+
22+ // PHP-CS-Fixer 1.x
23+ if (method_exists ('Symfony\CS\Fixer\Contrib\HeaderCommentFixer ' , 'getHeader ' )) {
24+ HeaderCommentFixer::setHeader ($ header );
25+ }
26+
27+ $ config = ConfigBridge::create ();
28+ $ config ->setUsingCache (true );
29+
30+ // PHP-CS-Fixer 2.x
31+ if (method_exists ($ config , 'setRules ' )) {
32+ $ config
33+ ->setRiskyAllowed (true )
34+ ->setRules (array_merge ($ config ->getRules (), array (
35+ 'header_comment ' => array ('header ' => $ header )
36+ )))
37+ ;
38+ }
39+
40+ return $ config ;
Original file line number Diff line number Diff line change 2525 },
2626 "require-dev" : {
2727 "phpunit/phpunit" : " ^4.6" ,
28- "sebastian/version" : " ^1.0.1"
28+ "sebastian/version" : " ^1.0.1" ,
29+ "sllh/php-cs-fixer-styleci-bridge" : " ^1.3@stable"
2930 },
3031 "minimum-stability" : " dev" ,
3132 "autoload" : {
You can’t perform that action at this time.
0 commit comments