1 | <?php declare(strict_types=1); |
||
2 | |||
3 | use Fidry\PhpCsFixerConfig\FidryConfig; |
||
4 | use PhpCsFixer\Finder; |
||
5 | |||
6 | $finder = Finder::create() |
||
7 | ->in([ |
||
8 | 'fixtures', |
||
9 | 'bin', |
||
10 | 'src', |
||
11 | 'tests', |
||
12 | ]) |
||
13 | ->append([ |
||
14 | 'bin/box', |
||
15 | 'bin/generate_default_stub', |
||
16 | ]) |
||
17 | ->exclude([ |
||
18 | 'bench', |
||
19 | 'build/dir018/var', |
||
20 | ]) |
||
21 | ->notName('*-phar-stub.php'); |
||
22 | |||
23 | $overriddenRules = [ |
||
24 | 'header_comment' => [ |
||
25 | 'header' => <<<'EOF' |
||
26 | This file is part of the box project. |
||
27 | |||
28 | (c) Kevin Herrera <[email protected]> |
||
29 | Théo Fidry <[email protected]> |
||
30 | |||
31 | This source file is subject to the MIT license that is bundled |
||
32 | with this source code in the file LICENSE. |
||
33 | EOF, |
||
34 | 'location' => 'after_declare_strict', |
||
35 | ], |
||
36 | ]; |
||
37 | |||
38 | $config = new FidryConfig('', 82_000); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
39 | $config->addRules($overriddenRules); |
||
40 | $config->setCacheFile(__DIR__.'/dist/.php-cs-fixer.cache'); |
||
41 | $config->setFinder($finder); |
||
42 | |||
43 | return $config; |
||
44 |