|
19 | 19 | 'backtick_to_shell_exec' => true,
|
20 | 20 | 'binary_operator_spaces' => true,
|
21 | 21 | 'blank_line_after_namespace' => true,
|
| 22 | + 'blank_lines_before_namespace' => ['max_line_breaks' => 2, 'min_line_breaks' => 2], // we want 1 blank line before namespace |
22 | 23 | 'blank_line_after_opening_tag' => true,
|
23 | 24 | 'blank_line_before_statement' => true,
|
24 |
| - 'braces' => true, |
| 25 | + //'braces' => true, |
25 | 26 | 'cast_spaces' => true,
|
26 | 27 | 'class_attributes_separation' => ['elements' => ['method' => 'one', 'property' => 'one']], // const are often grouped with other related const
|
27 | 28 | 'class_definition' => false, // phpcs disagree
|
28 |
| - 'class_keyword_remove' => false, // Deprecated, and ::class keyword gives us better support in IDE |
29 | 29 | 'combine_consecutive_issets' => true,
|
30 | 30 | 'combine_consecutive_unsets' => true,
|
31 | 31 | 'combine_nested_dirname' => true,
|
32 | 32 | 'comment_to_phpdoc' => false, // interferes with annotations
|
33 |
| - 'compact_nullable_typehint' => true, |
| 33 | + 'compact_nullable_type_declaration' => true, |
34 | 34 | 'concat_space' => ['spacing' => 'one'],
|
35 | 35 | 'constant_case' => true,
|
36 | 36 | 'date_time_immutable' => false, // Break our unit tests
|
|
47 | 47 | 'encoding' => true,
|
48 | 48 | 'ereg_to_preg' => true,
|
49 | 49 | 'error_suppression' => false, // it breaks \PhpOffice\PhpSpreadsheet\Helper\Handler
|
50 |
| - 'escape_implicit_backslashes' => true, |
51 | 50 | 'explicit_indirect_variable' => false, // I feel it makes the code actually harder to read
|
52 | 51 | 'explicit_string_variable' => false, // I feel it makes the code actually harder to read
|
53 | 52 | 'final_class' => false, // We need non-final classes
|
|
59 | 58 | 'fully_qualified_strict_types' => true,
|
60 | 59 | 'function_declaration' => true,
|
61 | 60 | 'function_to_constant' => true,
|
62 |
| - 'function_typehint_space' => true, |
63 | 61 | 'general_phpdoc_annotation_remove' => ['annotations' => ['access', 'category', 'copyright']],
|
64 | 62 | 'general_phpdoc_tag_rename' => true,
|
65 | 63 | 'global_namespace_import' => true,
|
|
93 | 91 | 'native_constant_invocation' => false, // Micro optimization that look messy
|
94 | 92 | 'native_function_casing' => true,
|
95 | 93 | 'native_function_invocation' => false, // I suppose this would be best, but I am still unconvinced about the visual aspect of it
|
96 |
| - 'native_function_type_declaration_casing' => true, |
97 |
| - 'new_with_braces' => true, |
| 94 | + 'new_with_parentheses' => ['anonymous_class' => true, 'named_class' => true], |
98 | 95 | 'no_alias_functions' => true,
|
99 | 96 | 'no_alias_language_construct_call' => true,
|
100 | 97 | 'no_alternative_syntax' => true,
|
101 | 98 | 'no_binary_string' => true,
|
102 | 99 | 'no_blank_lines_after_class_opening' => true,
|
103 | 100 | 'no_blank_lines_after_phpdoc' => true,
|
104 |
| - 'no_blank_lines_before_namespace' => false, // we want 1 blank line before namespace |
105 | 101 | 'no_break_comment' => true,
|
106 | 102 | 'no_closing_tag' => true,
|
107 | 103 | 'no_empty_comment' => true,
|
|
121 | 117 | 'no_space_around_double_colon' => true,
|
122 | 118 | 'no_spaces_after_function_name' => true,
|
123 | 119 | 'no_spaces_around_offset' => true,
|
124 |
| - 'no_spaces_inside_parenthesis' => true, |
125 | 120 | 'no_superfluous_elseif' => false, // Might be risky on a huge code base
|
126 | 121 | 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
|
127 |
| - 'no_trailing_comma_in_list_call' => true, |
128 |
| - 'no_trailing_comma_in_singleline_array' => true, |
| 122 | + 'no_trailing_comma_in_singleline' => ['elements' => ['arguments', 'array_destructuring', 'array', 'group_import']], |
129 | 123 | 'no_trailing_whitespace' => true,
|
130 | 124 | 'no_trailing_whitespace_in_comment' => true,
|
131 | 125 | 'no_trailing_whitespace_in_string' => false, // Too dangerous
|
132 | 126 | 'no_unneeded_control_parentheses' => true,
|
133 |
| - 'no_unneeded_curly_braces' => true, |
| 127 | + 'no_unneeded_braces' => true, |
134 | 128 | 'no_unneeded_final_method' => true,
|
135 | 129 | 'no_unreachable_default_argument_value' => true,
|
136 | 130 | 'no_unset_cast' => true,
|
|
215 | 209 | 'simplified_if_return' => false, // Even if technically correct we prefer to be explicit
|
216 | 210 | 'simplified_null_return' => false, // Even if technically correct we prefer to be explicit
|
217 | 211 | 'single_blank_line_at_eof' => true,
|
218 |
| - 'single_blank_line_before_namespace' => true, |
219 | 212 | 'single_class_element_per_statement' => true,
|
220 | 213 | 'single_import_per_statement' => true,
|
221 | 214 | 'single_line_after_imports' => true,
|
222 | 215 | 'single_line_comment_style' => true,
|
223 | 216 | 'single_line_throw' => false, // I don't see any reason for having a special case for Exception
|
224 | 217 | 'single_quote' => true,
|
225 |
| - 'single_space_after_construct' => true, |
| 218 | + //'single_space_after_construct' => true, |
226 | 219 | 'single_trait_insert_per_statement' => true,
|
227 | 220 | 'space_after_semicolon' => true,
|
| 221 | + 'spaces_inside_parentheses' => ['space' => 'none'], |
228 | 222 | 'standardize_increment' => true,
|
229 | 223 | 'standardize_not_equals' => true,
|
230 | 224 | 'static_lambda' => false, // Risky if we can't guarantee nobody use `bindTo()`
|
231 | 225 | 'strict_comparison' => false, // No, too dangerous to change that
|
| 226 | + 'string_implicit_backslashes' => false, // was escape_implicit_backslashes, too confusing |
232 | 227 | 'strict_param' => false, // No, too dangerous to change that
|
233 | 228 | 'string_length_to_empty' => true,
|
234 | 229 | 'string_line_ending' => true,
|
|
240 | 235 | 'ternary_to_null_coalescing' => true,
|
241 | 236 | 'trailing_comma_in_multiline' => true,
|
242 | 237 | 'trim_array_spaces' => true,
|
| 238 | + 'type_declaration_spaces' => ['elements' => ['function', 'property']], // was function_typehint_space |
243 | 239 | 'types_spaces' => true,
|
244 | 240 | 'unary_operator_spaces' => true,
|
245 | 241 | 'use_arrow_functions' => true,
|
|
0 commit comments