
no_whitespace_before_comma_in_array
¶In array declaration, there MUST NOT be a whitespace before each comma.
after_heredoc
¶Whether the whitespace between heredoc end and comma should be removed.
Allowed types: bool
Default value: false
Default configuration.
--- Original
+++ New
-<?php $x = array(1 , "2");
+<?php $x = array(1, "2");
With configuration: ['after_heredoc' => true]
.
--- Original
+++ New
<?php
$x = [<<<EOD
foo
-EOD
- , 'bar'
+EOD, 'bar'
];
The rule is part of the following rule sets:
Using the @PHP73Migration rule set will enable the no_whitespace_before_comma_in_array
rule with the config below:
['after_heredoc' => true]
Using the @PHP74Migration rule set will enable the no_whitespace_before_comma_in_array
rule with the config below:
['after_heredoc' => true]
Using the @PHP80Migration rule set will enable the no_whitespace_before_comma_in_array
rule with the config below:
['after_heredoc' => true]
Using the @PHP81Migration rule set will enable the no_whitespace_before_comma_in_array
rule with the config below:
['after_heredoc' => true]
Using the @PHP82Migration rule set will enable the no_whitespace_before_comma_in_array
rule with the config below:
['after_heredoc' => true]
Using the @PhpCsFixer rule set will enable the no_whitespace_before_comma_in_array
rule with the default config.
Using the @Symfony rule set will enable the no_whitespace_before_comma_in_array
rule with the default config.