PHP_CodeSniffer
PHP_CodeSniffer copied to clipboard
4.0 | Make isset, unset and empty parenthesis owners
Repost from https://github.com/squizlabs/PHP_CodeSniffer/issues/3118:
I was just wondering why
isset()
,unset()
andempty()
- all language constructs which require parentheses - are not considered parentheses owners.Would it make sense to change that ? Should be a relatively easy change to make as far as I can see.
Happy to make the changes if there is interest.
[Edit]: Might be useful to include
exit()
,die()
andeval()
as well, though these three don't require parentheses, but are "owners" when the parentheses are present.
See the original post for some pointers about the implementation.