Skip to content

Commit 6402b1e

Browse files
Update PHP-CS-Fixer configuration
1 parent 7961090 commit 6402b1e

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

.php-cs-fixer.dist.php

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
'blank_line_before_statement' => [
3434
'statements' => [
3535
'break',
36+
'case',
3637
'continue',
3738
'declare',
3839
'default',
@@ -44,6 +45,7 @@
4445
'if',
4546
'include',
4647
'include_once',
48+
'phpdoc',
4749
'require',
4850
'require_once',
4951
'return',
@@ -52,17 +54,15 @@
5254
'try',
5355
'while',
5456
'yield',
57+
'yield_from',
5558
],
5659
],
57-
'braces' => [
58-
'position_after_anonymous_constructs' => 'next',
59-
],
6060
'cast_spaces' => true,
6161
'class_attributes_separation' => [
6262
'elements' => [
63-
'const' => 'one',
63+
'const' => 'none',
6464
'method' => 'one',
65-
'property' => 'one'
65+
'property' => 'only_if_meta'
6666
]
6767
],
6868
'class_definition' => true,
@@ -73,7 +73,14 @@
7373
'compact_nullable_typehint' => true,
7474
'concat_space' => ['spacing' => 'one'],
7575
'constant_case' => true,
76+
'control_structure_braces' => true,
77+
'control_structure_continuation_position' => true,
78+
'curly_braces_position' => [
79+
'anonymous_functions_opening_brace' => 'next_line_unless_newline_at_signature_end',
80+
'anonymous_classes_opening_brace' => 'next_line_unless_newline_at_signature_end',
81+
],
7682
'declare_equal_normalize' => ['space' => 'none'],
83+
'declare_parentheses' => true,
7784
'declare_strict_types' => true,
7885
'dir_constant' => true,
7986
'echo_tag_syntax' => true,
@@ -146,6 +153,7 @@
146153
'no_leading_import_slash' => true,
147154
'no_leading_namespace_whitespace' => true,
148155
'no_mixed_echo_print' => ['use' => 'print'],
156+
'no_multiple_statements_per_line' => true,
149157
'no_multiline_whitespace_around_double_arrow' => true,
150158
'no_null_property_initialization' => true,
151159
'no_php4_constructor' => true,
@@ -271,11 +279,12 @@
271279
'single_import_per_statement' => true,
272280
'single_line_after_imports' => true,
273281
'single_quote' => true,
274-
'single_space_after_construct' => true,
282+
'single_space_around_construct' => true,
275283
'single_trait_insert_per_statement' => true,
276284
'space_after_semicolon' => true,
277285
'standardize_increment' => true,
278286
'standardize_not_equals' => true,
287+
'statement_indentation' => true,
279288
'static_lambda' => true,
280289
'strict_param' => true,
281290
'string_line_ending' => true,
@@ -291,6 +300,9 @@
291300
]
292301
],
293302
'trim_array_spaces' => true,
303+
'types_spaces' => [
304+
'space' => 'none',
305+
],
294306
'unary_operator_spaces' => true,
295307
'visibility_required' => [
296308
'elements' => [

0 commit comments

Comments
 (0)