Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 706 Bytes

no_trailing_comma_in_singleline_array.rst

File metadata and controls

30 lines (21 loc) · 706 Bytes

Rule no_trailing_comma_in_singleline_array

PHP single-line arrays should not have trailing comma.

Examples

Example #1

--- Original
+++ New
 <?php
-$a = array('sample',  );
+$a = array('sample');

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_array rule.

@Symfony

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