YoastCS: add dependency on PHPCSExtra and replace some sniffs with versions from Extra #318
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.
Composer: add PHPCSExtra
Add PHPCSExtra as a new dependency. PHPCSExtra is an external standard for PHP_CodeSniffer and is also a requirement for WPCS 3.0.0.
The reason to add it as a direct requirement for YoastCS is that we'll not only be using sniffs from PHPCSExtra via WPCS, but also want to use additional sniffs which PHPCSExtra has to offer, which makes it not just a requirement of WPCS, but also a requirement of YoastCS.
Ref: https://github.com/PHPCSStandards/PHPCSExtra
YoastCS: remove
IfElseDeclaration
sniff in favour of similar from PHPCSExtraThis commit removes the YoastCS native
Yoast.ControlStructures.IfElseDeclaration
sniff in favour of a similar sniff from PHPCSExtra.The PHPCSExtra
Universal.ControlStructures.IfElseDeclaration
sniff includes a fixer, making it more powerful than the YoastCS sniff.YoastCS: remove
NamespaceDeclaration
sniff in favour of similar from PHPCSExtraThis commit removes the
Yoast.Namespaces.NamespaceDeclaration
sniff in favour of three sniffs from PHPCSExtra, which combined do the same thing.