|
1 | 1 | <?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
2 | 5 | $finder = PhpCsFixer\Finder::create() |
3 | 6 | ->exclude('vendor') |
4 | 7 | ->in(__DIR__); |
5 | | -return PhpCsFixer\Config::create() |
| 8 | + |
| 9 | +return (new PhpCsFixer\Config()) |
6 | 10 | ->setUsingCache(true) |
7 | 11 | ->setRules([ |
8 | 12 | '@PSR2' => true, |
|
14 | 18 | 'indentation_type' => true, |
15 | 19 | 'blank_line_after_namespace' => true, |
16 | 20 | 'line_ending' => true, |
17 | | - 'lowercase_constants' => true, |
| 21 | + 'constant_case' => ['case' => 'lower'], // Replaces lowercase_constants |
18 | 22 | 'lowercase_keywords' => true, |
19 | 23 | 'no_closing_tag' => true, |
20 | 24 | 'single_line_after_imports' => true, |
|
23 | 27 | 'whitespace_after_comma_in_array' => true, |
24 | 28 | 'blank_line_after_opening_tag' => true, |
25 | 29 | 'no_empty_statement' => true, |
26 | | - 'no_extra_consecutive_blank_lines' => true, |
| 30 | + 'no_extra_blank_lines' => true, // Replaces no_extra_consecutive_blank_lines |
27 | 31 | 'function_typehint_space' => true, |
28 | 32 | 'no_leading_namespace_whitespace' => true, |
29 | 33 | 'no_blank_lines_after_class_opening' => true, |
30 | 34 | 'no_blank_lines_after_phpdoc' => true, |
31 | 35 | 'phpdoc_scalar' => true, |
32 | 36 | 'phpdoc_types' => true, |
33 | 37 | 'no_leading_import_slash' => true, |
34 | | - 'no_extra_consecutive_blank_lines' => ['use'], |
35 | | - 'blank_line_before_return' => true, |
| 38 | + 'blank_line_before_statement' => ['statements' => ['return']], // Replaces blank_line_before_return |
36 | 39 | 'self_accessor' => false, |
37 | 40 | 'no_short_bool_cast' => true, |
38 | 41 | 'no_trailing_comma_in_singleline_array' => true, |
|
0 commit comments