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