|
4 | 4 | ->in(__DIR__ . '/src')
|
5 | 5 | ->in(__DIR__ . '/tests');
|
6 | 6 |
|
7 |
| -return \PhpCsFixer\Config::create() |
| 7 | +return (new PhpCsFixer\Config()) |
8 | 8 | ->setRiskyAllowed(true)
|
9 | 9 | ->setRules([
|
10 |
| - '@PSR2' => true, |
| 10 | + '@PSR12' => true, |
11 | 11 |
|
12 | 12 | 'array_syntax' => [
|
13 | 13 | 'syntax' => 'short'
|
14 | 14 | ],
|
15 |
| - 'binary_operator_spaces' => [ |
16 |
| - 'align_double_arrow' => null, |
17 |
| - 'align_equals' => false, |
18 |
| - ], |
| 15 | + 'binary_operator_spaces' => true, |
19 | 16 | 'blank_line_after_opening_tag' => true,
|
20 | 17 | 'cast_spaces' => true,
|
| 18 | + 'class_attributes_separation' => ['elements' => ['method' => 'one']], |
21 | 19 | 'combine_consecutive_unsets' => true,
|
22 | 20 | 'concat_space' => [
|
23 | 21 | 'spacing' => 'one'
|
|
27 | 25 | 'ereg_to_preg' => true,
|
28 | 26 | 'function_to_constant' => true,
|
29 | 27 | 'function_typehint_space' => true,
|
30 |
| - 'hash_to_slash_comment' => true, |
31 | 28 | 'heredoc_to_nowdoc' => true,
|
32 | 29 | 'include' => true,
|
33 | 30 | 'is_null' => true,
|
34 | 31 | 'lowercase_cast' => true,
|
35 | 32 | 'magic_constant_casing' => true,
|
36 |
| - 'method_separation' => true, |
| 33 | + 'multiline_whitespace_before_semicolons' => true, |
37 | 34 | 'modernize_types_casting' => true,
|
38 | 35 | 'native_function_casing' => true,
|
39 | 36 | 'new_with_braces' => true,
|
|
43 | 40 | 'no_empty_comment' => true,
|
44 | 41 | 'no_empty_phpdoc' => true,
|
45 | 42 | 'no_empty_statement' => true,
|
46 |
| - 'no_extra_consecutive_blank_lines' => true, |
| 43 | + 'no_extra_blank_lines' => true, |
47 | 44 | 'no_leading_import_slash' => true,
|
48 | 45 | 'no_leading_namespace_whitespace' => true,
|
49 | 46 | 'no_mixed_echo_print' => true,
|
50 | 47 | 'no_multiline_whitespace_around_double_arrow' => true,
|
51 |
| - 'no_multiline_whitespace_before_semicolons' => true, |
52 | 48 | 'no_php4_constructor' => true,
|
53 | 49 | 'no_short_bool_cast' => true,
|
54 | 50 | 'no_singleline_whitespace_before_semicolons' => true,
|
|
73 | 69 | 'phpdoc_add_missing_param_annotation' => true,
|
74 | 70 | 'phpdoc_annotation_without_dot' => true,
|
75 | 71 | 'phpdoc_indent' => true,
|
76 |
| - 'phpdoc_inline_tag' => true, |
| 72 | + 'phpdoc_inline_tag_normalizer' => true, |
77 | 73 | 'phpdoc_no_access' => true,
|
78 | 74 | 'phpdoc_no_alias_tag' => true,
|
79 | 75 | 'phpdoc_no_package' => true,
|
|
84 | 80 | 'phpdoc_types' => true,
|
85 | 81 | 'phpdoc_var_without_name' => true,
|
86 | 82 | 'pow_to_exponentiation' => true,
|
87 |
| - 'psr4' => true, |
| 83 | + 'psr_autoloading' => true, |
88 | 84 | 'return_type_declaration' => true,
|
89 | 85 | 'self_accessor' => true,
|
90 | 86 | 'short_scalar_cast' => true,
|
91 | 87 | 'single_blank_line_before_namespace' => true,
|
| 88 | + 'single_line_comment_style' => true, |
92 | 89 | 'single_quote' => true,
|
93 | 90 | 'space_after_semicolon' => true,
|
94 | 91 | 'standardize_not_equals' => true,
|
95 | 92 | 'strict_comparison' => true,
|
96 | 93 | 'strict_param' => true,
|
97 | 94 | 'ternary_operator_spaces' => true,
|
98 |
| - 'trailing_comma_in_multiline_array' => true, |
| 95 | + 'trailing_comma_in_multiline' => true, |
99 | 96 | 'trim_array_spaces' => true,
|
| 97 | + 'visibility_required' => ['elements' => ['property', 'method']], |
100 | 98 | 'whitespace_after_comma_in_array' => true,
|
101 | 99 | ])
|
102 | 100 | ->setFinder($finder);
|
0 commit comments