|
21 | 21 | 'array_push' => true,
|
22 | 22 | 'array_syntax' => ['syntax' => 'short'],
|
23 | 23 | 'assign_null_coalescing_to_coalesce_equal' => true,
|
| 24 | + 'attribute_empty_parentheses' => true, |
24 | 25 | 'backtick_to_shell_exec' => true,
|
25 | 26 | 'binary_operator_spaces' => true,
|
26 | 27 | 'blank_line_after_namespace' => true,
|
27 | 28 | 'blank_line_after_opening_tag' => true,
|
28 | 29 | 'blank_line_before_statement' => true,
|
29 |
| - 'braces' => true, |
| 30 | + 'blank_line_between_import_groups' => true, |
| 31 | + 'blank_lines_before_namespace' => true, |
| 32 | + 'braces' => false, // Deprecated |
| 33 | + 'braces_position' => true, |
30 | 34 | 'cast_spaces' => true,
|
31 | 35 | 'class_attributes_separation' => ['elements' => ['method' => 'one', 'property' => 'one']], // const are often grouped with other related const
|
32 | 36 | 'class_definition' => true,
|
| 37 | + 'class_keyword' => false, // Because risky, and sometimes we prefer to keep FQCN as is |
33 | 38 | 'class_keyword_remove' => false, // Deprecated, and ::class keyword gives us better support in IDE
|
| 39 | + 'class_reference_name_casing' => true, |
| 40 | + 'clean_namespace' => true, |
34 | 41 | 'combine_consecutive_issets' => true,
|
35 | 42 | 'combine_consecutive_unsets' => true,
|
36 | 43 | 'combine_nested_dirname' => true,
|
37 | 44 | 'comment_to_phpdoc' => true,
|
38 |
| - 'compact_nullable_typehint' => true, |
| 45 | + 'compact_nullable_type_declaration' => true, |
| 46 | + 'compact_nullable_typehint' => false, // Deprecated |
39 | 47 | 'concat_space' => ['spacing' => 'one'],
|
40 | 48 | 'constant_case' => true,
|
| 49 | + 'control_structure_braces' => true, |
41 | 50 | 'control_structure_continuation_position' => true,
|
| 51 | + 'curly_braces_position' => false, // Deprecated |
| 52 | + 'date_time_create_from_format_call' => false, // Because risky |
42 | 53 | 'date_time_immutable' => true,
|
43 | 54 | 'declare_equal_normalize' => true,
|
44 | 55 | 'declare_parentheses' => true,
|
|
55 | 66 | 'encoding' => true,
|
56 | 67 | 'ereg_to_preg' => true,
|
57 | 68 | 'error_suppression' => true,
|
58 |
| - 'escape_implicit_backslashes' => true, |
| 69 | + 'escape_implicit_backslashes' => false, // Deprecated |
59 | 70 | 'explicit_indirect_variable' => false, // I feel it makes the code actually harder to read
|
60 | 71 | 'explicit_string_variable' => false, // I feel it makes the code actually harder to read
|
61 | 72 | 'final_class' => false, // We need non-final classes
|
|
67 | 78 | 'fully_qualified_strict_types' => true,
|
68 | 79 | 'function_declaration' => true,
|
69 | 80 | 'function_to_constant' => true,
|
70 |
| - 'function_typehint_space' => true, |
| 81 | + 'function_typehint_space' => false, // Deprecated |
| 82 | + 'general_attribute_remove' => true, |
71 | 83 | 'general_phpdoc_annotation_remove' => ['annotations' => ['author', 'category', 'copyright', 'package', 'throws']],
|
72 | 84 | 'general_phpdoc_tag_rename' => true,
|
| 85 | + 'get_class_to_class_keyword' => true, |
73 | 86 | 'global_namespace_import' => true,
|
74 | 87 | 'group_import' => false, // I feel it makes the code actually harder to read
|
75 | 88 | 'header_comment' => false, // We don't use common header in all our files
|
| 89 | + 'heredoc_closing_marker' => ['closing_marker' => 'STRING'], |
76 | 90 | 'heredoc_indentation' => true,
|
77 | 91 | 'heredoc_to_nowdoc' => false, // We often use variable in heredoc
|
78 | 92 | 'implode_call' => true,
|
|
84 | 98 | 'lambda_not_used_import' => true,
|
85 | 99 | 'line_ending' => true,
|
86 | 100 | 'linebreak_after_opening_tag' => true,
|
87 |
| - 'list_syntax' => ['syntax' => 'short'], |
| 101 | + 'list_syntax' => true, |
88 | 102 | 'logical_operators' => true,
|
| 103 | + 'long_to_shorthand_operator' => false, // Because risky |
89 | 104 | 'lowercase_cast' => true,
|
90 | 105 | 'lowercase_keywords' => true,
|
91 | 106 | 'lowercase_static_reference' => true,
|
|
97 | 112 | 'modernize_strpos' => true,
|
98 | 113 | 'modernize_types_casting' => true,
|
99 | 114 | 'multiline_comment_opening_closing' => true,
|
| 115 | + 'multiline_promoted_properties' => true, // Experimental |
| 116 | + 'multiline_string_to_heredoc' => false, // We prefer to keep some freedom |
100 | 117 | 'multiline_whitespace_before_semicolons' => true,
|
101 | 118 | 'native_constant_invocation' => false, // Micro optimization that look messy
|
102 | 119 | 'native_function_casing' => true,
|
103 | 120 | 'native_function_invocation' => false, // I suppose this would be best, but I am still unconvinced about the visual aspect of it
|
104 |
| - 'native_function_type_declaration_casing' => true, |
105 |
| - 'new_with_braces' => true, |
| 121 | + 'native_function_type_declaration_casing' => false, // Deprecated |
| 122 | + 'native_type_declaration_casing' => true, |
| 123 | + 'new_expression_parentheses' => false, // Requires PHP 8.4 |
| 124 | + 'new_with_braces' => false, // Deprecated |
| 125 | + 'new_with_parentheses' => true, |
106 | 126 | 'no_alias_functions' => true,
|
107 | 127 | 'no_alias_language_construct_call' => true,
|
108 |
| - 'no_alternative_syntax' => true, |
| 128 | + 'no_alternative_syntax' => false, // We want to use alternative syntax in .phtml |
109 | 129 | 'no_binary_string' => true,
|
110 | 130 | 'no_blank_lines_after_class_opening' => true,
|
111 | 131 | 'no_blank_lines_after_phpdoc' => true,
|
112 |
| - 'no_blank_lines_before_namespace' => false, // we want 1 blank line before namespace |
| 132 | + 'no_blank_lines_before_namespace' => false, // Deprecated |
113 | 133 | 'no_break_comment' => true,
|
114 | 134 | 'no_closing_tag' => true,
|
115 | 135 | 'no_empty_comment' => true,
|
|
121 | 141 | 'no_leading_namespace_whitespace' => true,
|
122 | 142 | 'no_mixed_echo_print' => true,
|
123 | 143 | 'no_multiline_whitespace_around_double_arrow' => true,
|
| 144 | + 'no_multiple_statements_per_line' => true, |
124 | 145 | 'no_null_property_initialization' => true,
|
125 | 146 | 'no_php4_constructor' => true,
|
126 | 147 | 'no_short_bool_cast' => true,
|
127 | 148 | 'no_singleline_whitespace_before_semicolons' => true,
|
128 | 149 | 'no_space_around_double_colon' => true,
|
129 | 150 | 'no_spaces_after_function_name' => true,
|
130 | 151 | 'no_spaces_around_offset' => true,
|
131 |
| - 'no_spaces_inside_parenthesis' => true, |
| 152 | + 'no_spaces_inside_parenthesis' => false, // Deprecated |
132 | 153 | 'no_superfluous_elseif' => true,
|
133 | 154 | 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
|
134 |
| - 'no_trailing_comma_in_list_call' => true, |
135 |
| - 'no_trailing_comma_in_singleline_array' => true, |
| 155 | + 'no_trailing_comma_in_list_call' => false, // Deprecated |
| 156 | + 'no_trailing_comma_in_singleline' => true, |
| 157 | + 'no_trailing_comma_in_singleline_array' => false, // Deprecated |
| 158 | + 'no_trailing_comma_in_singleline_function_call' => true, // Deprecated |
136 | 159 | 'no_trailing_whitespace' => true,
|
137 | 160 | 'no_trailing_whitespace_in_comment' => true,
|
138 | 161 | 'no_trailing_whitespace_in_string' => false, // Too dangerous
|
139 | 162 | 'no_unneeded_control_parentheses' => true,
|
140 |
| - 'no_unneeded_curly_braces' => true, |
| 163 | + 'no_unneeded_curly_braces' => false, // Deprecated |
141 | 164 | 'no_unneeded_final_method' => true,
|
| 165 | + 'no_unneeded_import_alias' => true, |
142 | 166 | 'no_unreachable_default_argument_value' => true,
|
143 | 167 | 'no_unset_cast' => true,
|
144 | 168 | 'no_unset_on_property' => true,
|
145 | 169 | 'no_unused_imports' => true,
|
| 170 | + 'no_useless_concat_operator' => true, |
146 | 171 | 'no_useless_else' => true,
|
| 172 | + 'no_useless_nullsafe_operator' => true, |
147 | 173 | 'no_useless_return' => true,
|
148 | 174 | 'no_useless_sprintf' => true,
|
149 | 175 | 'no_whitespace_before_comma_in_array' => true,
|
|
152 | 178 | 'normalize_index_brace' => true,
|
153 | 179 | 'not_operator_with_space' => false, // No we prefer to keep '!' without spaces
|
154 | 180 | 'not_operator_with_successor_space' => false, // idem
|
| 181 | + 'nullable_type_declaration' => true, |
155 | 182 | 'nullable_type_declaration_for_default_null_value' => true,
|
| 183 | + 'numeric_literal_separator' => false, // Maybe later... |
156 | 184 | 'object_operator_without_whitespace' => true,
|
157 | 185 | 'octal_notation' => true,
|
158 | 186 | 'operator_linebreak' => true,
|
| 187 | + 'ordered_attributes' => false, // We prefer to keep some freedom |
159 | 188 | 'ordered_class_elements' => false, // We prefer to keep some freedom
|
160 | 189 | 'ordered_imports' => true,
|
161 | 190 | 'ordered_interfaces' => true,
|
162 | 191 | 'ordered_traits' => true,
|
| 192 | + 'ordered_types' => false, // We prefer to keep some freedom |
| 193 | + 'php_unit_assert_new_names' => true, |
| 194 | + 'php_unit_attributes' => false, // Requires PHPUnit 10 |
163 | 195 | 'php_unit_construct' => true,
|
| 196 | + 'php_unit_data_provider_method_order' => true, |
| 197 | + 'php_unit_data_provider_name' => ['prefix' => 'provider', 'suffix' => ''], |
| 198 | + 'php_unit_data_provider_return_type' => true, |
| 199 | + 'php_unit_data_provider_static' => true, |
164 | 200 | 'php_unit_dedicate_assert' => true,
|
165 | 201 | 'php_unit_dedicate_assert_internal_type' => true,
|
166 | 202 | 'php_unit_expectation' => true,
|
|
180 | 216 | 'phpdoc_add_missing_param_annotation' => true,
|
181 | 217 | 'phpdoc_align' => false, // Waste of time
|
182 | 218 | 'phpdoc_annotation_without_dot' => true,
|
| 219 | + 'phpdoc_array_type' => false, // We prefer `T[]` instead of `array<T>` |
183 | 220 | 'phpdoc_indent' => true,
|
184 | 221 | 'phpdoc_inline_tag_normalizer' => true,
|
185 | 222 | 'phpdoc_line_span' => true,
|
| 223 | + 'phpdoc_list_type' => false, // Because we are not always sure what type it should actually be |
186 | 224 | 'phpdoc_no_access' => true,
|
187 |
| - 'phpdoc_no_alias_tag' => true, |
188 | 225 | 'phpdoc_no_empty_return' => true,
|
189 |
| - 'phpdoc_no_package' => true, |
190 |
| - 'phpdoc_no_useless_inheritdoc' => true, |
191 | 226 | 'phpdoc_order' => true,
|
192 | 227 | 'phpdoc_order_by_value' => true,
|
| 228 | + 'phpdoc_param_order' => true, |
| 229 | + 'phpdoc_readonly_class_comment_to_keyword' => true, |
193 | 230 | 'phpdoc_return_self_reference' => true,
|
194 | 231 | 'phpdoc_scalar' => true,
|
195 | 232 | 'phpdoc_separation' => true,
|
|
213 | 250 | 'random_api_migration' => true,
|
214 | 251 | 'regular_callable_call' => true,
|
215 | 252 | 'return_assignment' => false, // Sometimes useful for clarity or debug
|
| 253 | + 'return_to_yield_from' => false, // That seems useless |
216 | 254 | 'return_type_declaration' => true,
|
217 | 255 | 'self_accessor' => true,
|
218 | 256 | 'self_static_accessor' => true,
|
|
223 | 261 | 'simplified_if_return' => false, // Even if technically correct we prefer to be explicit
|
224 | 262 | 'simplified_null_return' => false, // Even if technically correct we prefer to be explicit
|
225 | 263 | 'single_blank_line_at_eof' => true,
|
226 |
| - 'single_blank_line_before_namespace' => true, |
| 264 | + 'single_blank_line_before_namespace' => false, // Deprecated |
227 | 265 | 'single_class_element_per_statement' => true,
|
228 | 266 | 'single_import_per_statement' => true,
|
229 | 267 | 'single_line_after_imports' => true,
|
| 268 | + 'single_line_comment_spacing' => true, |
230 | 269 | 'single_line_comment_style' => true,
|
| 270 | + 'single_line_empty_body' => true, |
231 | 271 | 'single_line_throw' => false, // I don't see any reason for having a special case for Exception
|
232 | 272 | 'single_quote' => true,
|
233 |
| - 'single_space_after_construct' => true, |
| 273 | + 'single_space_after_construct' => false, // Deprecated |
| 274 | + 'single_space_around_construct' => true, |
234 | 275 | 'single_trait_insert_per_statement' => true,
|
235 | 276 | 'space_after_semicolon' => true,
|
| 277 | + 'spaces_inside_parentheses' => true, |
236 | 278 | 'standardize_increment' => true,
|
237 | 279 | 'standardize_not_equals' => true,
|
| 280 | + 'statement_indentation' => true, |
238 | 281 | 'static_lambda' => false, // Risky if we can't guarantee nobody use `bindTo()`
|
| 282 | + 'static_private_method' => false, // In PHP we'd rather avoid static as a rule of thumb |
239 | 283 | 'strict_comparison' => true,
|
240 | 284 | 'strict_param' => true,
|
| 285 | + 'string_implicit_backslashes' => true, |
241 | 286 | 'string_length_to_empty' => true,
|
242 | 287 | 'string_line_ending' => true,
|
243 | 288 | 'switch_case_semicolon_to_colon' => true,
|
|
246 | 291 | 'ternary_operator_spaces' => true,
|
247 | 292 | 'ternary_to_elvis_operator' => true,
|
248 | 293 | 'ternary_to_null_coalescing' => true,
|
249 |
| - 'trailing_comma_in_multiline' => true, |
| 294 | + 'trailing_comma_in_multiline' => ['elements' => ['arguments', 'array_destructuring', 'arrays', 'match', 'parameters']], |
250 | 295 | 'trim_array_spaces' => true,
|
| 296 | + 'type_declaration_spaces' => true, |
251 | 297 | 'types_spaces' => true,
|
252 | 298 | 'unary_operator_spaces' => true,
|
253 | 299 | 'use_arrow_functions' => true,
|
254 | 300 | 'visibility_required' => true,
|
255 | 301 | 'void_return' => true,
|
256 | 302 | 'whitespace_after_comma_in_array' => true,
|
257 |
| - 'yoda_style' => false, |
| 303 | + 'yield_from_array_to_yields' => true, |
| 304 | + 'yoda_style' => false, // Like Yoda we speak not |
258 | 305 | ]);
|
0 commit comments