|
1 | 1 | <?php |
| 2 | + |
2 | 3 | $finder = PhpCsFixer\Finder::create() |
3 | | - ->in(__DIR__.'/src') |
4 | | - ->in(__DIR__.'/tests') |
5 | | -; |
6 | | -return PhpCsFixer\Config::create() |
| 4 | + ->in(__DIR__ . '/src') |
| 5 | + ->in(__DIR__ . '/tests'); |
| 6 | + |
| 7 | +return (new PhpCsFixer\Config()) |
| 8 | + ->setRiskyAllowed(true) |
7 | 9 | ->setRules([ |
8 | | - '@PSR2' => true, |
| 10 | + '@PSR12' => true, |
9 | 11 | 'array_syntax' => ['syntax' => 'short'], |
10 | 12 | 'concat_space' => ['spacing' => 'one'], |
11 | | - 'new_with_braces' => true, |
| 13 | + 'new_with_parentheses' => true, |
12 | 14 | 'no_blank_lines_after_phpdoc' => true, |
13 | 15 | 'no_empty_phpdoc' => true, |
14 | 16 | 'no_empty_comment' => true, |
15 | 17 | 'no_leading_import_slash' => true, |
16 | | - 'no_trailing_comma_in_singleline_array' => true, |
| 18 | + 'no_trailing_comma_in_singleline' => true, |
17 | 19 | 'no_unused_imports' => true, |
18 | | - 'ordered_imports' => ['importsOrder' => null, 'sortAlgorithm' => 'alpha'], |
| 20 | + 'ordered_imports' => ['sort_algorithm' => 'alpha'], |
19 | 21 | 'phpdoc_add_missing_param_annotation' => ['only_untyped' => true], |
20 | | - 'phpdoc_align' => true, |
| 22 | + 'phpdoc_align' => ['align' => 'left'], |
21 | 23 | 'phpdoc_no_empty_return' => true, |
22 | 24 | 'phpdoc_order' => true, |
23 | 25 | 'phpdoc_scalar' => true, |
24 | 26 | 'phpdoc_to_comment' => true, |
25 | | - 'psr0' => false, |
26 | | - 'psr4' => true, |
| 27 | + 'psr_autoloading' => true, |
27 | 28 | 'return_type_declaration' => ['space_before' => 'none'], |
28 | | - 'single_blank_line_before_namespace' => true, |
29 | 29 | 'single_quote' => true, |
30 | 30 | 'space_after_semicolon' => true, |
31 | 31 | 'ternary_operator_spaces' => true, |
32 | | - 'trailing_comma_in_multiline_array' => true, |
| 32 | + 'trailing_comma_in_multiline' => ['elements' => ['arrays']], |
33 | 33 | 'trim_array_spaces' => true, |
34 | 34 | 'whitespace_after_comma_in_array' => true, |
35 | 35 | ]) |
36 | | - ->setFinder($finder) |
37 | | -; |
| 36 | + ->setFinder($finder); |
0 commit comments