- Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
Currently phpcs doesn't check for a space between the function keyword and argument list in closures, so following code doesn't raise any warning:
$callback = function() { };
I'm trying to follow PSR-2 and it's somewhat annoying because i make that mistake rather often.
Also, this code passes without any warning:
$callback = function () use ($this){ };
Although it is not explicitly said that there must be a space after closing parenthesis of use list, it remains inconsistent with following case, for which there isn't an explicit rule either yet it actually raises an error:
$callback = function (){ };