Created
December 12, 2012 16:52
-
-
Save anonymous/4269459 to your computer and use it in GitHub Desktop.
phpcs PSR2 issue with "closure used directly in a function or method call as an argument"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> phpcs test.php --standard=PSR2 | |
FILE: test.php | |
-------------------------------------------------------------------------------- | |
FOUND 2 ERROR(S) AFFECTING 2 LINE(S) | |
-------------------------------------------------------------------------------- | |
4 | ERROR | Opening parenthesis of a multi-line function call must be the | |
| | last content on the line | |
6 | ERROR | Closing parenthesis of a multi-line function call must be on a | |
| | line by itself | |
-------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$foo->bar( | |
$arg1, | |
function ($arg2) use ($var1) { | |
// body | |
}, | |
$arg3 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment