Skip to content

Commit 6529c7a

Browse files
arnaud-lbondrejmirtes
authored andcommitted
phpcs: Disallow trailing commas in function calls, declarations, use list
Since these are now allowed in all supported PHP versions
1 parent 62a3b42 commit 6529c7a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

phpcs.xml

+5
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@
7979
<rule ref="SlevomatCodingStandard.Classes.TraitUseSpacing"/>
8080
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable"/>
8181
<rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
82+
<!-- Disallow trailing comma in function calls, since this breaks on PHP < 7.3 -->
83+
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall"/>
84+
<!-- Disallow trailing comma in closure use and function declarations, since this breaks on PHP < 8.0 -->
85+
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse" />
86+
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration" />
8287
<!--<rule ref="SlevomatCodingStandard.Functions.UnusedParameter"/>-->
8388
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure"/>
8489
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">

0 commit comments

Comments
 (0)