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 ($foo == 'bar') {
//... do some stuff
}
[$myFirstElement, $mySecondElement] = $arrayOfTwoElements;
The issue is between } and [ as the sniff does not handle yet the PHP 7.1 list new syntax.
Is this already fixed in v3.0.0?
Thanks a lot.
Regards,
The text was updated successfully, but these errors were encountered:
gsherwood
changed the title
Squiz.Arrays.ArrayBracketSpacing.SpaceBeforeBracket false positive match on PHP 7.1
Squiz.Arrays.ArrayBracketSpacing.SpaceBeforeBracket false positive match for short list syntax
Jan 20, 2017
The problem was that this array was not being changed to the custom T_[OPEN/CLOSE]_SHORT_ARRAY tokens because the } before the array was making PHPCS think it was in the form $c->{$var}[ ] = 2;. I've fixed this now. Thanks for reporting the issue.
I'm running PHPCS 2.7.1 to sniff PHP 7.1 code.
I got a PHPCS error with this kind of code:
The issue is between
}
and[
as the sniff does not handle yet the PHP 7.1 list new syntax.Is this already fixed in v3.0.0?
Thanks a lot.
Regards,
The text was updated successfully, but these errors were encountered: