|
10 | 10 | ->ignoreVCS(true);
|
11 | 11 |
|
12 | 12 | return (new PhpCsFixer\Config())
|
13 |
| - ->setRules( |
14 |
| - [ |
15 |
| - '@PHP81Migration' => true, |
16 |
| - '@PHP80Migration:risky' => true, |
17 |
| - '@PHPUnit100Migration:risky' => true, |
18 |
| - '@PSR12' => true, |
19 |
| - '@PSR2' => true, |
20 |
| - 'align_multiline_comment' => true, |
21 |
| - 'array_indentation' => true, |
22 |
| - 'array_syntax' => [ |
23 |
| - 'syntax' => 'short', |
| 13 | + ->setRules([ |
| 14 | + '@PHP82Migration' => true, |
| 15 | + '@PHP82Migration:risky' => true, |
| 16 | + '@PHPUnit100Migration:risky' => true, |
| 17 | + '@PER-CS' => true, |
| 18 | + '@PER-CS:risky' => true, |
| 19 | + 'align_multiline_comment' => true, |
| 20 | + 'array_indentation' => true, |
| 21 | + 'array_syntax' => [ |
| 22 | + 'syntax' => 'short', |
| 23 | + ], |
| 24 | + 'blank_line_after_opening_tag' => true, |
| 25 | + 'blank_line_before_statement' => [ |
| 26 | + 'statements' => [ |
| 27 | + 'break', |
| 28 | + 'case', |
| 29 | + 'continue', |
| 30 | + 'for', |
| 31 | + 'foreach', |
| 32 | + 'if', |
| 33 | + 'return', |
| 34 | + 'switch', |
| 35 | + 'throw', |
| 36 | + 'try', |
| 37 | + 'while', |
24 | 38 | ],
|
25 |
| - 'blank_line_after_opening_tag' => true, |
26 |
| - 'blank_line_before_statement' => [ |
27 |
| - 'statements' => [ |
28 |
| - 'break', |
29 |
| - 'case', |
30 |
| - 'continue', |
31 |
| - 'for', |
32 |
| - 'foreach', |
33 |
| - 'if', |
34 |
| - 'return', |
35 |
| - 'switch', |
36 |
| - 'throw', |
37 |
| - 'try', |
38 |
| - 'while', |
39 |
| - ], |
| 39 | + ], |
| 40 | + 'braces' => true, |
| 41 | + 'cast_spaces' => [ |
| 42 | + 'space' => 'single', |
| 43 | + ], |
| 44 | + 'class_definition' => true, |
| 45 | + 'combine_consecutive_issets' => true, |
| 46 | + 'combine_consecutive_unsets' => true, |
| 47 | + 'compact_nullable_typehint' => true, |
| 48 | + 'concat_space' => [ |
| 49 | + 'spacing' => 'one', |
| 50 | + ], |
| 51 | + 'declare_strict_types' => false, |
| 52 | + 'dir_constant' => true, |
| 53 | + 'function_to_constant' => true, |
| 54 | + 'function_typehint_space' => true, |
| 55 | + 'increment_style' => [ |
| 56 | + 'style' => 'post', |
| 57 | + ], |
| 58 | + 'is_null' => true, |
| 59 | + 'linebreak_after_opening_tag' => true, |
| 60 | + 'logical_operators' => true, |
| 61 | + 'lowercase_cast' => true, |
| 62 | + 'lowercase_static_reference' => true, |
| 63 | + 'magic_constant_casing' => true, |
| 64 | + 'method_argument_space' => [ |
| 65 | + 'on_multiline' => 'ensure_fully_multiline', |
| 66 | + ], |
| 67 | + 'method_chaining_indentation' => true, |
| 68 | + 'modernize_types_casting' => true, |
| 69 | + 'native_constant_invocation' => true, |
| 70 | + 'native_function_casing' => true, |
| 71 | + 'native_function_invocation' => true, |
| 72 | + 'new_with_braces' => true, |
| 73 | + 'no_alias_functions' => true, |
| 74 | + 'no_blank_lines_after_class_opening' => true, |
| 75 | + 'no_blank_lines_after_phpdoc' => true, |
| 76 | + 'no_empty_phpdoc' => true, |
| 77 | + 'no_empty_statement' => true, |
| 78 | + 'no_extra_blank_lines' => true, |
| 79 | + 'no_leading_import_slash' => true, |
| 80 | + 'no_mixed_echo_print' => true, |
| 81 | + 'no_multiline_whitespace_around_double_arrow' => true, |
| 82 | + 'no_null_property_initialization' => true, |
| 83 | + 'no_short_bool_cast' => true, |
| 84 | + 'no_spaces_after_function_name' => true, |
| 85 | + 'no_spaces_inside_parenthesis' => true, |
| 86 | + 'no_superfluous_elseif' => true, |
| 87 | + 'no_trailing_comma_in_singleline_array' => true, |
| 88 | + 'no_trailing_whitespace' => true, |
| 89 | + 'no_trailing_whitespace_in_comment' => true, |
| 90 | + 'no_unneeded_control_parentheses' => true, |
| 91 | + 'no_unused_imports' => true, |
| 92 | + 'no_useless_else' => true, |
| 93 | + 'no_useless_return' => true, |
| 94 | + 'no_whitespace_before_comma_in_array' => true, |
| 95 | + 'ordered_imports' => true, |
| 96 | + 'phpdoc_align' => true, |
| 97 | + 'phpdoc_scalar' => true, |
| 98 | + 'protected_to_private' => true, |
| 99 | + 'return_type_declaration' => true, |
| 100 | + 'set_type_to_cast' => true, |
| 101 | + 'simplified_null_return' => true, |
| 102 | + 'single_blank_line_at_eof' => true, |
| 103 | + 'single_class_element_per_statement' => [ |
| 104 | + 'elements' => ['property'], |
| 105 | + ], |
| 106 | + 'single_import_per_statement' => true, |
| 107 | + 'single_line_after_imports' => true, |
| 108 | + 'switch_case_semicolon_to_colon' => true, |
| 109 | + 'switch_case_space' => true, |
| 110 | + 'ternary_to_null_coalescing' => true, |
| 111 | + 'trailing_comma_in_multiline' => [ |
| 112 | + 'after_heredoc' => true, |
| 113 | + 'elements' => [ |
| 114 | + 'arrays', |
40 | 115 | ],
|
41 |
| - 'braces' => true, |
42 |
| - 'cast_spaces' => [ |
43 |
| - 'space' => 'single', |
44 |
| - ], |
45 |
| - 'class_definition' => true, |
46 |
| - 'combine_consecutive_issets' => true, |
47 |
| - 'combine_consecutive_unsets' => true, |
48 |
| - 'compact_nullable_typehint' => true, |
49 |
| - 'concat_space' => [ |
50 |
| - 'spacing' => 'one', |
51 |
| - ], |
52 |
| - 'declare_strict_types' => false, |
53 |
| - 'dir_constant' => true, |
54 |
| - 'function_to_constant' => true, |
55 |
| - 'function_typehint_space' => true, |
56 |
| - 'increment_style' => [ |
57 |
| - 'style' => 'post', |
58 |
| - ], |
59 |
| - 'is_null' => true, |
60 |
| - 'linebreak_after_opening_tag' => true, |
61 |
| - 'logical_operators' => true, |
62 |
| - 'lowercase_cast' => true, |
63 |
| - 'lowercase_static_reference' => true, |
64 |
| - 'magic_constant_casing' => true, |
65 |
| - 'method_argument_space' => [ |
66 |
| - 'on_multiline' => 'ensure_fully_multiline', |
67 |
| - ], |
68 |
| - 'method_chaining_indentation' => true, |
69 |
| - 'modernize_types_casting' => true, |
70 |
| - 'native_constant_invocation' => true, |
71 |
| - 'native_function_casing' => true, |
72 |
| - 'native_function_invocation' => true, |
73 |
| - 'new_with_braces' => true, |
74 |
| - 'no_alias_functions' => true, |
75 |
| - 'no_blank_lines_after_class_opening' => true, |
76 |
| - 'no_blank_lines_after_phpdoc' => true, |
77 |
| - 'no_empty_phpdoc' => true, |
78 |
| - 'no_empty_statement' => true, |
79 |
| - 'no_extra_blank_lines' => true, |
80 |
| - 'no_leading_import_slash' => true, |
81 |
| - 'no_mixed_echo_print' => true, |
82 |
| - 'no_multiline_whitespace_around_double_arrow' => true, |
83 |
| - 'no_null_property_initialization' => true, |
84 |
| - 'no_short_bool_cast' => true, |
85 |
| - 'no_spaces_after_function_name' => true, |
86 |
| - 'no_spaces_inside_parenthesis' => true, |
87 |
| - 'no_superfluous_elseif' => true, |
88 |
| - 'no_trailing_comma_in_singleline_array' => true, |
89 |
| - 'no_trailing_whitespace' => true, |
90 |
| - 'no_trailing_whitespace_in_comment' => true, |
91 |
| - 'no_unneeded_control_parentheses' => true, |
92 |
| - 'no_unused_imports' => true, |
93 |
| - 'no_useless_else' => true, |
94 |
| - 'no_useless_return' => true, |
95 |
| - 'no_whitespace_before_comma_in_array' => true, |
96 |
| - 'ordered_imports' => true, |
97 |
| - 'phpdoc_align' => true, |
98 |
| - 'phpdoc_scalar' => true, |
99 |
| - 'protected_to_private' => true, |
100 |
| - 'return_type_declaration' => true, |
101 |
| - 'set_type_to_cast' => true, |
102 |
| - 'simplified_null_return' => true, |
103 |
| - 'single_blank_line_at_eof' => true, |
104 |
| - 'single_class_element_per_statement' => [ |
105 |
| - 'elements' => ['property'], |
106 |
| - ], |
107 |
| - 'single_import_per_statement' => true, |
108 |
| - 'single_line_after_imports' => true, |
109 |
| - 'switch_case_semicolon_to_colon' => true, |
110 |
| - 'switch_case_space' => true, |
111 |
| - 'ternary_to_null_coalescing' => true, |
112 |
| - 'trailing_comma_in_multiline' => [ |
113 |
| - 'after_heredoc' => true, |
114 |
| - 'elements' => [ |
115 |
| - 'arrays', |
116 |
| - ], |
117 |
| - ], |
118 |
| - 'visibility_required' => [ |
119 |
| - 'elements' => ['property', 'method', 'const'], |
120 |
| - ], |
121 |
| - 'yoda_style' => false, |
122 |
| - ] |
123 |
| - ) |
| 116 | + ], |
| 117 | + 'visibility_required' => [ |
| 118 | + 'elements' => ['property', 'method', 'const'], |
| 119 | + ], |
| 120 | + 'yoda_style' => false, |
| 121 | + ]) |
124 | 122 | ->setRiskyAllowed(true)
|
125 | 123 | ->setFinder($finder);
|
0 commit comments