Fork me on GitHub
a Sensio Labs Product

BerSzcz against war! (v3.8.0) edition

Rule no_trailing_comma_in_singleline_function_call

When making a method or function call on a single line there MUST NOT be a trailing comma after the last argument.

Examples

Example #1

--- Original
+++ New
 <?php
-foo($a,);
+foo($a);

Rule sets

The rule is part of the following rule sets:

@PhpCsFixer

Using the @PhpCsFixer rule set will enable the no_trailing_comma_in_singleline_function_call rule.

@Symfony

Using the @Symfony rule set will enable the no_trailing_comma_in_singleline_function_call rule.

The logo is © 2010-2022 Sensio Labs