-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy path.php_cs
More file actions
34 lines (25 loc) · 815 Bytes
/
.php_cs
File metadata and controls
34 lines (25 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
require_once __DIR__.'/vendor/autoload.php';
use SLLH\StyleCIBridge\ConfigBridge;
use Symfony\CS\Fixer\Contrib\HeaderCommentFixer;
$header = <<<EOF
This file is part of the puli/cli package.
(c) Bernhard Schussek <bschussek@gmail.com>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
// PHP-CS-Fixer 1.x
if (method_exists('Symfony\CS\Fixer\Contrib\HeaderCommentFixer', 'getHeader')) {
HeaderCommentFixer::setHeader($header);
}
$config = ConfigBridge::create();
$config->setUsingCache(true);
// PHP-CS-Fixer 2.x
if (method_exists($config, 'setRules')) {
$config
->setRules(array_merge($config->getRules(), array(
'header_comment' => array('header' => $header)
)))
;
}
return $config;