Skip to content

Commit b863ba1

Browse files
committed
[Tests] Aligned test snapshots with replacement of deprecated rules
1 parent f22ae97 commit b863ba1

File tree

4 files changed

+39
-38
lines changed

4 files changed

+39
-38
lines changed

tests/lib/PhpCsFixer/Sets/expected_rules/4_6_rule_set/local_rules.php

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@
2121
'return',
2222
],
2323
],
24-
'braces' => [
25-
'allow_single_line_closure' => true,
26-
],
24+
'single_space_around_construct' => true,
25+
'control_structure_braces' => true,
26+
'control_structure_continuation_position' => true,
27+
'no_multiple_statements_per_line' => true,
28+
'declare_parentheses' => true,
29+
'braces_position' => true,
30+
'statement_indentation' => false,
2731
'cast_spaces' => false,
2832
'class_attributes_separation' => [
2933
'elements' => [
@@ -49,7 +53,7 @@
4953
'full_opening_tag' => true,
5054
'function_declaration' => true,
5155
'function_to_constant' => true,
52-
'function_typehint_space' => true,
56+
'type_declaration_spaces' => true,
5357
'general_phpdoc_tag_rename' => true,
5458
'header_comment' => [
5559
'comment_type' => 'PHPDoc',
@@ -82,8 +86,8 @@
8286
],
8387
'native_function_casing' => true,
8488
'native_function_invocation' => false,
85-
'native_function_type_declaration_casing' => true,
86-
'new_with_braces' => true,
89+
'native_type_declaration_casing' => true,
90+
'new_with_parentheses' => true,
8791
'no_alias_functions' => true,
8892
'no_blank_lines_after_class_opening' => true,
8993
'no_blank_lines_after_phpdoc' => true,
@@ -111,13 +115,12 @@
111115
'no_singleline_whitespace_before_semicolons' => true,
112116
'no_spaces_after_function_name' => true,
113117
'no_spaces_around_offset' => true,
114-
'no_spaces_inside_parenthesis' => true,
115-
'no_trailing_comma_in_list_call' => true,
116-
'no_trailing_comma_in_singleline_array' => true,
118+
'spaces_inside_parentheses' => true,
119+
'no_trailing_comma_in_singleline' => true,
117120
'no_trailing_whitespace' => true,
118121
'no_trailing_whitespace_in_comment' => true,
119122
'no_unneeded_control_parentheses' => true,
120-
'no_unneeded_curly_braces' => true,
123+
'no_unneeded_braces' => true,
121124
'no_unneeded_final_method' => true,
122125
'no_unused_imports' => true,
123126
'no_whitespace_before_comma_in_array' => true,
@@ -170,7 +173,7 @@
170173
'short_scalar_cast' => true,
171174
'simplified_null_return' => false,
172175
'single_blank_line_at_eof' => true,
173-
'single_blank_line_before_namespace' => true,
176+
'blank_lines_before_namespace' => true,
174177
'single_class_element_per_statement' => true,
175178
'single_import_per_statement' => true,
176179
'single_line_after_imports' => true,
@@ -191,7 +194,7 @@
191194
'trailing_comma_in_multiline' => true,
192195
'trim_array_spaces' => true,
193196
'unary_operator_spaces' => true,
194-
'visibility_required' => true,
197+
'modifier_keywords' => true,
195198
'whitespace_after_comma_in_array' => true,
196199
'yoda_style' => false,
197200
'Ibexa/multiline_parameters' => true,

tests/lib/PhpCsFixer/Sets/expected_rules/4_6_rule_set/php_cs_fixer_rules.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'declare_equal_normalize' => true,
1212
'lowercase_cast' => true,
1313
'lowercase_static_reference' => true,
14-
'new_with_braces' => true,
14+
'new_with_parentheses' => true,
1515
'no_blank_lines_after_class_opening' => true,
1616
'no_leading_import_slash' => true,
1717
'no_whitespace_in_blank_line' => true,
@@ -21,7 +21,7 @@
2121
'single_import_per_statement' => true,
2222
'single_trait_insert_per_statement' => true,
2323
'ternary_operator_spaces' => true,
24-
'visibility_required' => true,
24+
'modifier_keywords' => true,
2525
'blank_line_after_namespace' => true,
2626
'constant_case' => [
2727
'case' => 'lower',
@@ -168,16 +168,18 @@
168168
'concat_space' => [
169169
'spacing' => 'one',
170170
],
171-
'braces' => [
172-
'allow_single_line_closure' => true,
173-
],
174-
'no_spaces_inside_parenthesis' => true,
175-
'function_typehint_space' => true,
176-
'native_function_type_declaration_casing' => true,
177-
'no_trailing_comma_in_list_call' => true,
178-
'no_trailing_comma_in_singleline_array' => true,
179-
'no_unneeded_curly_braces' => true,
180-
'single_blank_line_before_namespace' => true,
171+
'braces_position' => true,
172+
'single_space_around_construct' => true,
173+
'control_structure_braces' => true,
174+
'control_structure_continuation_position' => true,
175+
'no_multiple_statements_per_line' => true,
176+
'declare_parentheses' => true,
177+
'spaces_inside_parentheses' => true,
178+
'type_declaration_spaces' => true,
179+
'native_type_declaration_casing' => true,
180+
'no_trailing_comma_in_singleline' => true,
181+
'no_unneeded_braces' => true,
182+
'blank_lines_before_namespace' => true,
181183
'Ibexa/multiline_parameters' => true,
182184
'fully_qualified_strict_types' => [
183185
'import_symbols' => true,

tests/lib/PhpCsFixer/Sets/expected_rules/5_0_rule_set/local_rules.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@
2323
],
2424
],
2525
'blank_lines_before_namespace' => true,
26-
'braces' => [
27-
'allow_single_line_closure' => true,
28-
],
26+
'declare_parentheses' => true,
27+
'no_unneeded_braces' => true,
2928
'cast_spaces' => false,
3029
'class_attributes_separation' => [
3130
'elements' => [
@@ -86,8 +85,8 @@
8685
],
8786
'native_function_casing' => true,
8887
'native_function_invocation' => false,
89-
'native_function_type_declaration_casing' => true,
90-
'new_with_braces' => true,
88+
'native_type_declaration_casing' => true,
89+
'new_with_parentheses' => true,
9190
'no_alias_functions' => true,
9291
'no_blank_lines_after_class_opening' => true,
9392
'no_blank_lines_after_phpdoc' => true,
@@ -126,7 +125,6 @@
126125
'no_trailing_whitespace' => true,
127126
'no_trailing_whitespace_in_comment' => true,
128127
'no_unneeded_control_parentheses' => true,
129-
'no_unneeded_curly_braces' => true,
130128
'no_unneeded_final_method' => true,
131129
'no_unused_imports' => true,
132130
'no_whitespace_before_comma_in_array' => true,
@@ -214,7 +212,7 @@
214212
'space' => 'single',
215213
],
216214
'unary_operator_spaces' => true,
217-
'visibility_required' => true,
215+
'modifier_keywords' => true,
218216
'whitespace_after_comma_in_array' => true,
219217
'yoda_style' => false,
220218
'Ibexa/multiline_parameters' => true,

tests/lib/PhpCsFixer/Sets/expected_rules/5_0_rule_set/php_cs_fixer_rules.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
'declare_equal_normalize' => true,
2222
'lowercase_cast' => true,
2323
'lowercase_static_reference' => true,
24-
'new_with_braces' => true,
2524
'no_blank_lines_after_class_opening' => true,
2625
'no_leading_import_slash' => true,
2726
'no_whitespace_in_blank_line' => true,
@@ -31,7 +30,7 @@
3130
'single_import_per_statement' => true,
3231
'single_trait_insert_per_statement' => true,
3332
'ternary_operator_spaces' => true,
34-
'visibility_required' => true,
33+
'modifier_keywords' => true,
3534
'blank_line_after_namespace' => true,
3635
'constant_case' => [
3736
'case' => 'lower',
@@ -178,16 +177,15 @@
178177
'trim_array_spaces' => true,
179178
'unary_operator_spaces' => true,
180179
'whitespace_after_comma_in_array' => true,
181-
'braces' => [
182-
'allow_single_line_closure' => true,
183-
],
180+
'declare_parentheses' => true,
181+
'new_with_parentheses' => true,
184182
'type_declaration_spaces' => [
185183
'elements' => [
186184
'function',
187185
'property',
188186
],
189187
],
190-
'native_function_type_declaration_casing' => true,
188+
'native_type_declaration_casing' => true,
191189
'no_trailing_comma_in_singleline' => [
192190
'elements' => [
193191
'arguments',
@@ -196,7 +194,7 @@
196194
'group_import',
197195
],
198196
],
199-
'no_unneeded_curly_braces' => true,
197+
'no_unneeded_braces' => true,
200198
'php_unit_test_case_static_method_calls' => [
201199
'call_type' => 'self',
202200
],

0 commit comments

Comments
 (0)