-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined array key in Generic.WhiteSpace.ScopeIndent #437
Comments
I can confirm this is reproducible on the current The line causing the error can be seen at At frist glance there is no obvious culprit and the same issue can be reproduced using version |
I've been digging into this one and it looks like it is a pretty complex bug in the Currently working on fixing that bug. Once that bug is fixed, I'll have to see if the reported issue can still be reproduced and if there is anything within the |
Pff.. this was complex one. PR #502 should fix it though. Testing appreciated. |
Describe the bug
When checking a specific file (see minimal code sample), phpcs throws an
undefined array key
error.Code sample
(Yes, i know the code is very convoluted, it's very much an edge-case)
Interestingly enough, the unrelated array key is relevant, if removed then the error doesn't occur anymore.
Custom ruleset
No custom ruleset defined.
To reproduce
Steps to reproduce the behavior:
test.php
with the code sample above...phpcs test.php
Expected behavior
Show an understandable/fixable error, instead of a generic error coming from inside of phpcs.
Versions
Please confirm:
master
branch of PHP_CodeSniffer.The text was updated successfully, but these errors were encountered: