|
1 | 1 | <?php |
2 | 2 |
|
3 | | -$finder = PhpCsFixer\Finder::create() |
| 3 | +use PhpCsFixer\Config; |
| 4 | +use PhpCsFixer\Finder; |
| 5 | + |
| 6 | +$finder = Finder::create() |
4 | 7 | ->ignoreDotFiles(false) |
5 | 8 | ->ignoreVCSIgnored(true) |
6 | 9 | ->exclude('tests/Fixture') |
7 | 10 | ->in(__DIR__) |
8 | 11 | ; |
9 | 12 |
|
10 | | -$config = new PhpCsFixer\Config(); |
| 13 | +$config = new Config(); |
11 | 14 | $config |
12 | 15 | ->setRiskyAllowed(true) |
13 | 16 | ->setRules([ |
14 | 17 | '@PhpCsFixer' => true, |
15 | 18 | '@PhpCsFixer:risky' => true, |
16 | 19 | '@PHP70Migration' => true, |
17 | | - 'yoda_style' => [ |
18 | | - 'equal' => false, |
19 | | - 'identical' => false, |
20 | | - 'less_and_greater' => false, |
21 | | - ], |
22 | | - 'concat_space' => ['spacing' => 'one'], |
23 | | - 'explicit_indirect_variable' => false, |
24 | | - 'explicit_string_variable' => false, |
25 | | - 'method_chaining_indentation' => false, |
26 | | - 'php_unit_test_annotation' => false, |
27 | | - 'single_line_comment_style' => false, |
28 | | - 'ternary_to_elvis_operator' => false, |
29 | | - 'visibility_required' => ['elements' => ['method', 'property']], |
| 20 | + 'method_chaining_indentation' => false, // does not fit style of codebase |
| 21 | + 'php_unit_test_annotation' => false, // does not fit style of codebase |
| 22 | + 'php_unit_data_provider_return_type' => false, // for low-level PHP support |
| 23 | + 'ternary_to_elvis_operator' => false, // for low-level PHP support |
| 24 | + 'visibility_required' => ['elements' => ['method', 'property']], // for low-level PHP support |
| 25 | + 'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => false], // to support low-end PHP versions |
30 | 26 | ]) |
31 | 27 | ->setFinder($finder) |
32 | 28 | ; |
|
0 commit comments