1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | /* |
||
6 | * This file is part of the box project. |
||
7 | * |
||
8 | * (c) Kevin Herrera <[email protected]> |
||
9 | * Théo Fidry <[email protected]> |
||
10 | * |
||
11 | * This source file is subject to the MIT license that is bundled |
||
12 | * with this source code in the file LICENSE. |
||
13 | */ |
||
14 | |||
15 | use Fidry\PhpCsFixerConfig\FidryConfig; |
||
16 | use PhpCsFixer\Finder; |
||
17 | |||
18 | $finder = Finder::create() |
||
19 | ->in([ |
||
20 | 'src', |
||
21 | 'tests', |
||
22 | ]) |
||
23 | ->append([ |
||
24 | 'check-requirements.php', |
||
25 | '.php-cs-fixer.dist.php', |
||
26 | 'scoper.inc.php', |
||
27 | ]); |
||
28 | |||
29 | $overriddenRules = [ |
||
30 | 'header_comment' => [ |
||
31 | 'header' => <<<'EOF' |
||
32 | This file is part of the box project. |
||
33 | |||
34 | (c) Kevin Herrera <[email protected]> |
||
35 | Théo Fidry <[email protected]> |
||
36 | |||
37 | This source file is subject to the MIT license that is bundled |
||
38 | with this source code in the file LICENSE. |
||
39 | EOF, |
||
40 | 'location' => 'after_declare_strict', |
||
41 | ], |
||
42 | 'mb_str_functions' => false, |
||
43 | 'no_trailing_whitespace_in_string' => false, |
||
44 | 'use_arrow_functions' => false, |
||
45 | 'trailing_comma_in_multiline' => [ |
||
46 | 'elements' => ['arrays'], |
||
47 | ], |
||
48 | ]; |
||
49 | |||
50 | $config = new FidryConfig('', 74_000); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
51 | $config->addRules($overriddenRules); |
||
52 | $config->setCacheFile(__DIR__.'/dist/.php-cs-fixer.cache'); |
||
53 | $config->setFinder($finder); |
||
54 | |||
55 | return $config; |
||
56 |