Whitespace/ControlStructureSpacing: sync with upstream + minor tweaks #2333
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 hasn't had an extensive review as it realistically shouldn't exist - see #2332. It has been made compatible with modern PHP without a deep dive into whether what it is doing is correct in other ways.
Whitespace/ControlStructureSpacing: sync with upstream [1]
Add metrics for blank line at start/end of control structure as per squizlabs/PHP_CodeSniffer@4fc2515 (PHPCS 2.5.1).
Whitespace/ControlStructureSpacing: sync with upstream [2]
Check the spacing after the
finally
keyword as per squizlabs/PHP_CodeSniffer@eefb31c (PHPCS 3.2.3).Handled in a slightly different way as upstream as the sniffs have diverged, but this should work for the most part (aside from pre-existing issues in the sniff anyway).
Whitespace/ControlStructureSpacing: sync with upstream [3]
Check the spacing for
match
control structures as per squizlabs/PHP_CodeSniffer@549899b (PHPCS 3.6.0).Whitespace/ControlStructureSpacing: sync with upstream [4]
Ignore blank line/spacing rules when the next thing (inside/outside) is an enum as per squizlabs/PHP_CodeSniffer@7f11ffc and squizlabs/PHP_CodeSniffer@b71b470 (PHPCS 3.7.0).
WhiteSpace/ControlStructureSpacing: implement PHPCSUtils
Minor code simplifications by using PHPCSUtils.
WhiteSpace/ControlStructureSpacing: fix/update class docblock
Last update date is based on the last upstream commit to this sniff.