Skip to content

Commit 2a62f45

Browse files
committed
Refine no_trailing_comma_in_singleline rule to specify elements.
1 parent 288e7cb commit 2a62f45

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.php-cs-fixer-rules.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@
5656
'no_short_bool_cast' => true,
5757
'no_singleline_whitespace_before_semicolons' => true,
5858
'no_spaces_around_offset' => true,
59-
'no_trailing_comma_in_singleline' => false, // it's a good marker that there are more elements in an array
59+
'no_trailing_comma_in_singleline' => [
60+
'elements' => ['arguments', 'array', 'group_import'], // excludes 'array_destructuring' enabled by default
61+
],
6062
'no_unneeded_braces' => true,
6163
'no_unneeded_control_parentheses' => true,
6264
'no_unneeded_final_method' => true,

0 commit comments

Comments
 (0)