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
Add rule for PHP's @ operator #496
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Needs docs & rule declaration and we are good to 🚢
Rebased and squashed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the rule also works in the globall namespace, outside of functions or classes, then the documentation and the tests should reflect that.
If not, we should make it so.
Resolves phpmd#496 (review)
@ravage84 |
No worries. Unfortunately I'm busy as f***k. I get back at you as soon as I can. Thanks! |
Any progress on this? That's a really good check we'd like to see. In our use case, we would catch a lot of suppressed array access errors, e.g. |
Even though there is a tendency, we shouldn't be too specific as the performance hit can and does vary between PHP versions: https://3v4l.org/EStsR
Closes #62