You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a multi-line function call and you put a comment after one of the arguments, the Zend sniff standard will complain if you have more than one space between the comma and the comment. It should not complain about this.
With a multi-line array, it accepts more than one space.
$ cat test.php
<?php
$a = array(
"1",
"2", // this is a comment
"3"
);
$b = foo(
"1",
"2", // this is a comment
"3"
);
main $ phpcs25 test.php
FILE: test.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
2 | ERROR | Missing file doc comment
----------------------------------------------------------------------
Time: 19ms; Memory: 3.75Mb
main $ phpcs25 --standard=Zend test.php
FILE: test.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
9 | ERROR | [x] Expected 1 space after comma in function call; 2
| | found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 14ms; Memory: 3Mb
The text was updated successfully, but these errors were encountered:
gsherwood
changed the title
"Zend" standard complains about more than one space before comment in multi-line function call
FunctionCallArgumentSpacing sniff complains about more than one space before comment in multi-line function call
Dec 20, 2015
If you have a multi-line function call and you put a comment after one of the arguments, the Zend sniff standard will complain if you have more than one space between the comma and the comment. It should not complain about this.
With a multi-line array, it accepts more than one space.
The text was updated successfully, but these errors were encountered: