@@ -26,10 +26,10 @@ public static function getForPhp72(array $overriddenRules = []): array
2626 public static function getForPhp73 (array $ overriddenRules = []): array
2727 {
2828 $ specific73Rules = [
29- 'heredoc_indentation ' => true ,
29+ 'heredoc_indentation ' => true ,
3030 'method_argument_space ' => [
3131 'after_heredoc ' => true ,
32- 'on_multiline ' => 'ensure_fully_multiline ' ,
32+ 'on_multiline ' => 'ensure_fully_multiline ' ,
3333 ],
3434 'no_whitespace_before_comma_in_array ' => [
3535 'after_heredoc ' => true ,
@@ -42,14 +42,11 @@ public static function getForPhp73(array $overriddenRules = []): array
4242 private static function getBaseRules (): array
4343 {
4444 return [
45- '@Symfony ' => true ,
45+ '@Symfony ' => true ,
4646 'align_multiline_comment ' => [
4747 'comment_type ' => 'all_multiline ' ,
4848 ],
49- 'array_indentation ' => true ,
50- 'binary_operator_spaces ' => [
51- 'default ' => 'align_single_space_minimal ' ,
52- ],
49+ 'array_indentation ' => true ,
5350 'blank_line_before_statement ' => [
5451 'statements ' => [
5552 'break ' , 'continue ' , 'case ' , 'declare ' , 'default ' , 'do ' , 'for ' , 'foreach ' ,
@@ -61,18 +58,18 @@ private static function getBaseRules(): array
6158 ],
6259 'combine_consecutive_issets ' => true ,
6360 'combine_consecutive_unsets ' => true ,
64- 'combine_nested_dirname ' => true ,
65- 'compact_nullable_typehint ' => true ,
66- 'concat_space ' => [
61+ 'combine_nested_dirname ' => true ,
62+ 'compact_nullable_typehint ' => true ,
63+ 'concat_space ' => [
6764 'spacing ' => 'one ' ,
6865 ],
69- 'dir_constant ' => true ,
70- 'escape_implicit_backslashes ' => true ,
71- 'explicit_indirect_variable ' => true ,
72- 'explicit_string_variable ' => true ,
66+ 'dir_constant ' => true ,
67+ 'escape_implicit_backslashes ' => true ,
68+ 'explicit_indirect_variable ' => true ,
69+ 'explicit_string_variable ' => true ,
7370 'fully_qualified_strict_types ' => true ,
74- 'function_to_constant ' => true ,
75- 'global_namespace_import ' => false ,
71+ 'function_to_constant ' => true ,
72+ 'global_namespace_import ' => false ,
7673 // 'header_comment' => [ // Has too many issues atm
7774 // 'header' => '',
7875 // ],
@@ -82,33 +79,33 @@ private static function getBaseRules(): array
8279 'list_syntax ' => [
8380 'syntax ' => 'short ' ,
8481 ],
85- 'magic_method_casing ' => true ,
82+ 'magic_method_casing ' => true ,
8683 'method_argument_space ' => [
8784 'on_multiline ' => 'ensure_fully_multiline ' ,
8885 ],
89- 'method_chaining_indentation ' => true ,
90- 'modernize_types_casting ' => true ,
91- 'multiline_comment_opening_closing ' => true ,
92- 'multiline_whitespace_before_semicolons ' => true ,
86+ 'method_chaining_indentation ' => true ,
87+ 'modernize_types_casting ' => true ,
88+ 'multiline_comment_opening_closing ' => true ,
89+ 'multiline_whitespace_before_semicolons ' => true ,
9390 'native_function_type_declaration_casing ' => true ,
94- 'no_alias_functions ' => true ,
95- 'no_alternative_syntax ' => true ,
96- 'no_extra_blank_lines ' => [
91+ 'no_alias_functions ' => true ,
92+ 'no_alternative_syntax ' => true ,
93+ 'no_extra_blank_lines ' => [
9794 'tokens ' => [
9895 'break ' , 'case ' , 'continue ' , 'curly_brace_block ' , 'default ' , 'extra ' , 'parenthesis_brace_block ' ,
9996 'return ' , 'square_brace_block ' , 'throw ' , 'use_trait ' ,
10097 // TODO: Add 'use' when php-cs-fixer #3582 is fixed
10198 ],
10299 ],
103- 'no_null_property_initialization ' => true ,
104- 'no_superfluous_elseif ' => true ,
105- 'no_superfluous_phpdoc_tags ' => true ,
106- 'no_unset_cast ' => true ,
107- 'no_unset_on_property ' => false , // It's purposely used for the side effect :(
108- 'no_useless_else ' => true ,
109- 'no_useless_return ' => true ,
100+ 'no_null_property_initialization ' => true ,
101+ 'no_superfluous_elseif ' => true ,
102+ 'no_superfluous_phpdoc_tags ' => true ,
103+ 'no_unset_cast ' => true ,
104+ 'no_unset_on_property ' => false , // It's purposely used for the side effect :(
105+ 'no_useless_else ' => true ,
106+ 'no_useless_return ' => true ,
110107 'nullable_type_declaration_for_default_null_value ' => true ,
111- 'ordered_class_elements ' => [
108+ 'ordered_class_elements ' => [
112109 'order ' => [
113110 'use_trait ' ,
114111 'constant_public ' , 'constant_protected ' , 'constant_private ' ,
@@ -120,52 +117,52 @@ private static function getBaseRules(): array
120117 'imports_order ' => ['class ' , 'function ' , 'const ' ],
121118 ],
122119 'phpdoc_line_span ' => [
123- 'const ' => 'single ' ,
124- 'method ' => 'multi ' ,
120+ 'const ' => 'single ' ,
121+ 'method ' => 'multi ' ,
125122 'property ' => 'single ' ,
126123 ],
127- 'phpdoc_no_empty_return ' => true ,
128- 'php_unit_construct ' => true ,
124+ 'phpdoc_no_empty_return ' => true ,
125+ 'php_unit_construct ' => true ,
129126 'php_unit_dedicate_assert_internal_type ' => true ,
130- 'php_unit_method_casing ' => true ,
127+ 'php_unit_method_casing ' => true ,
131128 'php_unit_test_case_static_method_calls ' => [
132129 'call_type ' => 'self ' ,
133130 ],
134131 'phpdoc_annotation_without_dot ' => false , // Sometimes comments have a good reason to end with a dot. Leave this up to the engineer.
135- 'phpdoc_no_alias_tag ' => [
132+ 'phpdoc_no_alias_tag ' => [
136133 'replacements ' => [
137134 'link ' => 'see ' ,
138135 'type ' => 'var ' ,
139136 ],
140137 ],
141- 'phpdoc_order ' => true ,
142- 'phpdoc_summary ' => false , // Sometimes comments have a good reason not to end with a dot. Leave this up to the engineer.
143- 'phpdoc_to_comment ' => false , // We use more annotations than only structural elements (f.e. @lang JSON)
138+ 'phpdoc_order ' => true ,
139+ 'phpdoc_summary ' => false , // Sometimes comments have a good reason not to end with a dot. Leave this up to the engineer.
140+ 'phpdoc_to_comment ' => false , // We use more annotations than only structural elements (f.e. @lang JSON)
144141 'phpdoc_trim_consecutive_blank_line_separation ' => true ,
145- 'phpdoc_types_order ' => [
142+ 'phpdoc_types_order ' => [
146143 'null_adjustment ' => 'always_last ' ,
147144 ],
148145 'phpdoc_var_annotation_correct_order ' => true ,
149- 'pow_to_exponentiation ' => true ,
150- 'return_assignment ' => true ,
151- 'simple_to_complex_string_variable ' => true ,
152- 'simplified_null_return ' => false , // Too many old code places that become implicit, also ignores doc blocks.
153- 'single_class_element_per_statement ' => true ,
154- 'single_line_throw ' => false ,
155- 'single_quote ' => false ,
156- 'single_trait_insert_per_statement ' => true ,
157- 'space_after_semicolon ' => [
146+ 'pow_to_exponentiation ' => true ,
147+ 'return_assignment ' => true ,
148+ 'simple_to_complex_string_variable ' => true ,
149+ 'simplified_null_return ' => false , // Too many old code places that become implicit, also ignores doc blocks.
150+ 'single_class_element_per_statement ' => true ,
151+ 'single_line_throw ' => false ,
152+ 'single_quote ' => false ,
153+ 'single_trait_insert_per_statement ' => true ,
154+ 'space_after_semicolon ' => [
158155 'remove_in_empty_for_expressions ' => true ,
159156 ],
160157 'ternary_to_null_coalescing ' => true ,
161- 'visibility_required ' => [
158+ 'visibility_required ' => [
162159 'elements ' => [
163160 'const ' , 'method ' , 'property ' ,
164161 ],
165162 ],
166163 'yoda_style ' => [
167- 'equal ' => false ,
168- 'identical ' => false ,
164+ 'equal ' => false ,
165+ 'identical ' => false ,
169166 'less_and_greater ' => false ,
170167 ],
171168 ];
0 commit comments