-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
The following code sample is valid in 1.5 but causes errors in 2.0.
bar([
'foo' => foo(function () {
return 'foo';
})
]);
$ php vendor/bin/phpcs --standard=PSR2 -sv test.php
Registering sniffs in the PSR2 standard... DONE (40 sniffs registered)
Creating file list... DONE (1 files in queue)
Changing into directory /var/lib/phpcs-test/
Processing test.php [PHP => 35 tokens in 7 lines]... DONE in 3ms (1 errors, 0 warnings)
FILE: /var/lib/phpcs-test/test.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
7 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 0
| | (Generic.WhiteSpace.ScopeIndent.Incorrect)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 25ms; Memory: 3.5Mb
I tested this specifically on 2.0.0, but am seeing it on master as well.