- Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
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