PHP 7.0: New NewNestedStaticAccess sniff #963
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This sniff only covers a small part of the changes in the PHP 7.0 Uniform Variable Syntax RFC, but it's at least another part which is covered.
Ref: https://wiki.php.net/rfc/uniform_variable_syntax
The sniff implementation as is being pulled now is supported by various tests run on 3v4l:
https://3v4l.org/up9e3
https://3v4l.org/7tZcL
https://3v4l.org/5uuFR
https://3v4l.org/grUNF
https://3v4l.org/mtWn9
https://3v4l.org/PAtnX
https://3v4l.org/qujtp
https://3v4l.org/Rrteo
https://3v4l.org/GQA2P
https://3v4l.org/2XCUZ
https://3v4l.org/d3vcp
Includes unit tests.
The sniff has been run over a number of large PHP projects to see if any false positives could be found, but didn't find any, though I'm not giving out any guarantees at this point.
Fixes #946