-
Notifications
You must be signed in to change notification settings - Fork 1
/
.php-cs-fixer.dist.php
37 lines (28 loc) · 937 Bytes
/
.php-cs-fixer.dist.php
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
35
36
37
<?php
$header = <<<EOF
This file is part of the Serendipity HQ Features Bundle.
Copyright (c) Adamo Aerendir Crespi <[email protected]>.
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
$rules = include \SerendipityHQ\Integration\PhpCsFixer\SerendipityHQ::SHQ_SYMFONY_BUNDLE;
$rector = PhpCsFixer\Finder::create()
->in(__DIR__)->depth('== 0')->files()->name(['rector.php'])
->getIterator();
$phan = PhpCsFixer\Finder::create()
->in(__DIR__ . '/.phan')
->getIterator();
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__.'/src',
__DIR__.'/tests',
])
->append($rector)
->append($phan);
$config = new PhpCsFixer\Config();
return $config
->setFinder($finder)
->setUsingCache(true)
->setCacheFile(__DIR__.'/var/cache/.php_cs.cache')
->setRiskyAllowed(true)
->setRules($rules);