@@ -70,6 +70,15 @@ public function __construct()
7070 'min_line_breaks ' => 2 ,
7171 'max_line_breaks ' => 2 ,
7272 ],
73+ 'braces_position ' => [
74+ 'control_structures_opening_brace ' => 'same_line ' ,
75+ 'functions_opening_brace ' => 'next_line_unless_newline_at_signature_end ' ,
76+ 'anonymous_functions_opening_brace ' => 'same_line ' ,
77+ 'classes_opening_brace ' => 'next_line_unless_newline_at_signature_end ' ,
78+ 'anonymous_classes_opening_brace ' => 'same_line ' ,
79+ 'allow_single_line_empty_anonymous_classes ' => true ,
80+ 'allow_single_line_anonymous_functions ' => true ,
81+ ],
7382 'cast_spaces ' => ['space ' => 'single ' ],
7483 'class_attributes_separation ' => [
7584 'elements ' => [
@@ -101,31 +110,22 @@ public function __construct()
101110 'phpstan-ignore-next-line ' ,
102111 ],
103112 ],
104- 'compact_nullable_typehint ' => true ,
113+ 'compact_nullable_type_declaration ' => true ,
105114 'concat_space ' => ['spacing ' => 'one ' ],
106115 'constant_case ' => ['case ' => 'lower ' ],
107116 'control_structure_braces ' => true ,
108117 'control_structure_continuation_position ' => ['position ' => 'same_line ' ],
109- 'curly_braces_position ' => [
110- 'control_structures_opening_brace ' => 'same_line ' ,
111- 'functions_opening_brace ' => 'next_line_unless_newline_at_signature_end ' ,
112- 'anonymous_functions_opening_brace ' => 'same_line ' ,
113- 'classes_opening_brace ' => 'next_line_unless_newline_at_signature_end ' ,
114- 'anonymous_classes_opening_brace ' => 'same_line ' ,
115- 'allow_single_line_empty_anonymous_classes ' => true ,
116- 'allow_single_line_anonymous_functions ' => true ,
117- ],
118- 'date_time_create_from_format_call ' => true ,
119- 'date_time_immutable ' => false ,
120- 'declare_equal_normalize ' => ['space ' => 'none ' ],
121- 'declare_parentheses ' => true ,
122- 'declare_strict_types ' => false ,
123- 'dir_constant ' => true ,
124- 'doctrine_annotation_array_assignment ' => false ,
125- 'doctrine_annotation_braces ' => false ,
126- 'doctrine_annotation_indentation ' => false ,
127- 'doctrine_annotation_spaces ' => false ,
128- 'echo_tag_syntax ' => [
118+ 'date_time_create_from_format_call ' => true ,
119+ 'date_time_immutable ' => false ,
120+ 'declare_equal_normalize ' => ['space ' => 'none ' ],
121+ 'declare_parentheses ' => true ,
122+ 'declare_strict_types ' => false ,
123+ 'dir_constant ' => true ,
124+ 'doctrine_annotation_array_assignment ' => false ,
125+ 'doctrine_annotation_braces ' => false ,
126+ 'doctrine_annotation_indentation ' => false ,
127+ 'doctrine_annotation_spaces ' => false ,
128+ 'echo_tag_syntax ' => [
129129 'format ' => 'short ' ,
130130 'long_function ' => 'echo ' ,
131131 'shorten_simple_statements_only ' => false ,
@@ -216,20 +216,21 @@ public function __construct()
216216 'magic_method_casing ' => true ,
217217 'mb_str_functions ' => false ,
218218 'method_argument_space ' => [
219- 'after_heredoc ' => false ,
220219 'keep_multiple_spaces_after_comma ' => false ,
221220 'on_multiline ' => 'ensure_fully_multiline ' ,
222- ],
223- 'method_chaining_indentation ' => true ,
224- 'modernize_strpos ' => false , // requires 8.0+
225- 'modernize_types_casting ' => true ,
226- 'multiline_comment_opening_closing ' => true ,
227- 'multiline_whitespace_before_semicolons ' => ['strategy ' => 'no_multi_line ' ],
228- 'native_constant_invocation ' => false ,
229- 'native_function_casing ' => true ,
230- 'native_function_invocation ' => false ,
231- 'native_function_type_declaration_casing ' => true ,
232- 'new_with_braces ' => [
221+ 'after_heredoc ' => false ,
222+ 'attribute_placement ' => 'standalone ' ,
223+ ],
224+ 'method_chaining_indentation ' => true ,
225+ 'modernize_strpos ' => false , // requires 8.0+
226+ 'modernize_types_casting ' => true ,
227+ 'multiline_comment_opening_closing ' => true ,
228+ 'multiline_whitespace_before_semicolons ' => ['strategy ' => 'no_multi_line ' ],
229+ 'native_constant_invocation ' => false ,
230+ 'native_function_casing ' => true ,
231+ 'native_function_invocation ' => false ,
232+ 'native_type_declaration_casing ' => true ,
233+ 'new_with_parentheses ' => [
233234 'named_class ' => true ,
234235 'anonymous_class ' => true ,
235236 ],
@@ -291,6 +292,7 @@ public function __construct()
291292 'no_trailing_whitespace ' => true ,
292293 'no_trailing_whitespace_in_comment ' => true ,
293294 'no_trailing_whitespace_in_string ' => true ,
295+ 'no_unneeded_braces ' => ['namespaces ' => true ],
294296 'no_unneeded_control_parentheses ' => [
295297 'statements ' => [
296298 'break ' ,
@@ -302,7 +304,6 @@ public function __construct()
302304 'yield ' ,
303305 ],
304306 ],
305- 'no_unneeded_curly_braces ' => ['namespaces ' => true ],
306307 'no_unneeded_final_method ' => ['private_methods ' => true ],
307308 'no_unneeded_import_alias ' => true ,
308309 'no_unreachable_default_argument_value ' => true ,
0 commit comments