|
22 | 22 | 'braces' => true,
|
23 | 23 | 'cast_spaces' => true,
|
24 | 24 | 'class_attributes_separation' => ['elements' => ['method' => 'one', 'property' => 'one']], // const are often grouped with other related const
|
25 |
| - 'class_definition' => false, |
26 |
| - 'class_keyword_remove' => false, // ::class keyword gives us better support in IDE |
| 25 | + 'class_definition' => false, // phpcs disagree |
| 26 | + 'class_keyword_remove' => false, // Deprecated, and ::class keyword gives us better support in IDE |
27 | 27 | 'combine_consecutive_issets' => true,
|
28 | 28 | 'combine_consecutive_unsets' => true,
|
29 | 29 | 'combine_nested_dirname' => true,
|
|
40 | 40 | 'doctrine_annotation_indentation' => true,
|
41 | 41 | 'doctrine_annotation_spaces' => true,
|
42 | 42 | 'elseif' => true,
|
| 43 | + 'empty_loop_body' => true, |
| 44 | + 'empty_loop_condition' => true, |
43 | 45 | 'encoding' => true,
|
44 | 46 | 'ereg_to_preg' => true,
|
| 47 | + 'error_suppression' => false, // it breaks \PhpOffice\PhpSpreadsheet\Helper\Handler |
45 | 48 | 'escape_implicit_backslashes' => true,
|
46 | 49 | 'explicit_indirect_variable' => false, // I feel it makes the code actually harder to read
|
47 | 50 | 'explicit_string_variable' => false, // I feel it makes the code actually harder to read
|
48 | 51 | 'final_class' => false, // We need non-final classes
|
49 | 52 | 'final_internal_class' => true,
|
50 | 53 | 'final_public_method_for_abstract_class' => false, // We need non-final methods
|
51 |
| - 'self_static_accessor' => true, |
52 | 54 | 'fopen_flag_order' => true,
|
53 | 55 | 'fopen_flags' => true,
|
54 | 56 | 'full_opening_tag' => true,
|
|
57 | 59 | 'function_to_constant' => true,
|
58 | 60 | 'function_typehint_space' => true,
|
59 | 61 | 'general_phpdoc_annotation_remove' => ['annotations' => ['access', 'category', 'copyright']],
|
| 62 | + 'general_phpdoc_tag_rename' => true, |
60 | 63 | 'global_namespace_import' => true,
|
| 64 | + 'group_import' => false, // I feel it makes the code actually harder to read |
61 | 65 | 'header_comment' => false, // We don't use common header in all our files
|
62 | 66 | 'heredoc_indentation' => true,
|
63 | 67 | 'heredoc_to_nowdoc' => false, // Not sure about this one
|
64 | 68 | 'implode_call' => true,
|
65 | 69 | 'include' => true,
|
66 | 70 | 'increment_style' => true,
|
67 | 71 | 'indentation_type' => true,
|
| 72 | + 'integer_literal_case' => true, |
68 | 73 | 'is_null' => true,
|
| 74 | + 'lambda_not_used_import' => true, |
69 | 75 | 'line_ending' => true,
|
70 | 76 | 'linebreak_after_opening_tag' => true,
|
71 | 77 | 'list_syntax' => ['syntax' => 'short'],
|
|
78 | 84 | 'mb_str_functions' => false, // No, too dangerous to change that
|
79 | 85 | 'method_argument_space' => true,
|
80 | 86 | 'method_chaining_indentation' => true,
|
| 87 | + 'modernize_strpos' => true, |
81 | 88 | 'modernize_types_casting' => true,
|
82 | 89 | 'multiline_comment_opening_closing' => true,
|
83 | 90 | 'multiline_whitespace_before_semicolons' => true,
|
|
87 | 94 | 'native_function_type_declaration_casing' => true,
|
88 | 95 | 'new_with_braces' => true,
|
89 | 96 | 'no_alias_functions' => true,
|
| 97 | + 'no_alias_language_construct_call' => true, |
90 | 98 | 'no_alternative_syntax' => true,
|
91 | 99 | 'no_binary_string' => true,
|
92 | 100 | 'no_blank_lines_after_class_opening' => true,
|
|
108 | 116 | 'no_short_bool_cast' => true,
|
109 | 117 | 'echo_tag_syntax' => ['format' => 'long'],
|
110 | 118 | 'no_singleline_whitespace_before_semicolons' => true,
|
| 119 | + 'no_space_around_double_colon' => true, |
111 | 120 | 'no_spaces_after_function_name' => true,
|
112 | 121 | 'no_spaces_around_offset' => true,
|
113 | 122 | 'no_spaces_inside_parenthesis' => true,
|
|
117 | 126 | 'no_trailing_comma_in_singleline_array' => true,
|
118 | 127 | 'no_trailing_whitespace' => true,
|
119 | 128 | 'no_trailing_whitespace_in_comment' => true,
|
| 129 | + 'no_trailing_whitespace_in_string' => false, // Too dangerous |
120 | 130 | 'no_unneeded_control_parentheses' => true,
|
121 | 131 | 'no_unneeded_curly_braces' => true,
|
122 | 132 | 'no_unneeded_final_method' => true,
|
|
126 | 136 | 'no_unused_imports' => true,
|
127 | 137 | 'no_useless_else' => true,
|
128 | 138 | 'no_useless_return' => true,
|
| 139 | + 'no_useless_sprintf' => true, |
129 | 140 | 'no_whitespace_before_comma_in_array' => true,
|
130 | 141 | 'no_whitespace_in_blank_line' => true,
|
131 | 142 | 'non_printable_character' => true,
|
|
135 | 146 | 'nullable_type_declaration_for_default_null_value' => true,
|
136 | 147 | 'object_operator_without_whitespace' => true,
|
137 | 148 | 'octal_notation' => true,
|
| 149 | + 'operator_linebreak' => true, |
138 | 150 | 'ordered_class_elements' => false, // We prefer to keep some freedom
|
139 | 151 | 'ordered_imports' => true,
|
140 | 152 | 'ordered_interfaces' => true,
|
| 153 | + 'ordered_traits' => true, |
141 | 154 | 'php_unit_construct' => true,
|
142 | 155 | 'php_unit_dedicate_assert' => true,
|
143 | 156 | 'php_unit_dedicate_assert_internal_type' => true,
|
|
173 | 186 | 'phpdoc_separation' => true,
|
174 | 187 | 'phpdoc_single_line_var_spacing' => true,
|
175 | 188 | 'phpdoc_summary' => true,
|
| 189 | + 'phpdoc_tag_casing' => true, |
| 190 | + 'phpdoc_tag_type' => true, |
176 | 191 | 'phpdoc_to_comment' => false, // interferes with annotations
|
177 | 192 | 'phpdoc_to_param_type' => false, // Because experimental, but interesting for one shot use
|
178 |
| - 'phpdoc_to_return_type' => false, // idem |
| 193 | + 'phpdoc_to_property_type' => false, // Because experimental, but interesting for one shot use |
| 194 | + 'phpdoc_to_return_type' => false, // Because experimental, but interesting for one shot use |
179 | 195 | 'phpdoc_trim' => true,
|
180 | 196 | 'phpdoc_trim_consecutive_blank_line_separation' => true,
|
181 | 197 | 'phpdoc_types' => true,
|
|
184 | 200 | 'phpdoc_var_without_name' => true,
|
185 | 201 | 'pow_to_exponentiation' => true,
|
186 | 202 | 'protected_to_private' => true,
|
187 |
| - //'psr0' => true, |
188 |
| - //'psr4' => true, |
| 203 | + 'psr_autoloading' => true, |
189 | 204 | 'random_api_migration' => true,
|
190 | 205 | 'return_assignment' => false, // Sometimes useful for clarity or debug
|
191 | 206 | 'return_type_declaration' => true,
|
|
195 | 210 | 'set_type_to_cast' => true,
|
196 | 211 | 'short_scalar_cast' => true,
|
197 | 212 | 'simple_to_complex_string_variable' => false, // Would differ from TypeScript without obvious advantages
|
| 213 | + 'simplified_if_return' => false, // Even if technically correct we prefer to be explicit |
198 | 214 | 'simplified_null_return' => false, // Even if technically correct we prefer to be explicit
|
199 | 215 | 'single_blank_line_at_eof' => true,
|
200 | 216 | 'single_blank_line_before_namespace' => true,
|
|
204 | 220 | 'single_line_comment_style' => true,
|
205 | 221 | 'single_line_throw' => false, // I don't see any reason for having a special case for Exception
|
206 | 222 | 'single_quote' => true,
|
| 223 | + 'single_space_after_construct' => true, |
207 | 224 | 'single_trait_insert_per_statement' => true,
|
208 | 225 | 'space_after_semicolon' => true,
|
209 | 226 | 'standardize_increment' => true,
|
210 | 227 | 'standardize_not_equals' => true,
|
211 | 228 | 'static_lambda' => false, // Risky if we can't guarantee nobody use `bindTo()`
|
212 | 229 | 'strict_comparison' => false, // No, too dangerous to change that
|
213 | 230 | 'strict_param' => false, // No, too dangerous to change that
|
| 231 | + 'string_length_to_empty' => true, |
214 | 232 | 'string_line_ending' => true,
|
215 | 233 | 'switch_case_semicolon_to_colon' => true,
|
216 | 234 | 'switch_case_space' => true,
|
| 235 | + 'switch_continue_to_break' => true, |
217 | 236 | 'ternary_operator_spaces' => true,
|
| 237 | + 'ternary_to_elvis_operator' => true, |
218 | 238 | 'ternary_to_null_coalescing' => true,
|
219 | 239 | 'trailing_comma_in_multiline' => true,
|
220 | 240 | 'trim_array_spaces' => true,
|
| 241 | + 'types_spaces' => true, |
221 | 242 | 'unary_operator_spaces' => true,
|
| 243 | + 'use_arrow_functions' => true, |
222 | 244 | 'visibility_required' => ['elements' => ['property', 'method']], // not const
|
223 | 245 | 'void_return' => true,
|
224 | 246 | 'whitespace_after_comma_in_array' => true,
|
|
0 commit comments