Skip to content
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

PSR2/PSR12/ControlStructureSpacing: don't listen for T_ELSE #3872

Closed

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Aug 11, 2023

Description

No functional changes.

These sniffs only concern themselves with control structures which take parentheses, so listening for T_ELSE is unnecessary as the sniffs will never do anything for that token (they each bow out on no 'parenthesis_opener'/'parenthesis_closer' found).

Suggested changelog entry

N/A (no functional changes)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    • This change is only breaking for integrators, not for external standards or end-users.
  • Documentation improvement

@jrfnl jrfnl changed the title PSR2/ControlStructureSpacing: don't listen for T_ELSE PSR2/PSR12/ControlStructureSpacing: don't listen for T_ELSE Aug 11, 2023
No functional changes.

These sniffs only concerns themselves with control structures which take parentheses, so listening for `T_ELSE` is unnecessary as the sniffs will never do anything for that token (they each bow out on no 'parenthesis_opener'/'parenthesis_closer' found).
@jrfnl jrfnl force-pushed the feature/psr2-controlstructurespacing-remove-t_else branch from 1e26c73 to 33845b8 Compare August 11, 2023 00:29
@DannyvdSluijs
Copy link

Since the changes have no effect (as it is a reduction of the tokens it wants to process) the verification is done by confirming the description of this PR is correct and secondly that the code changes are as expected.

@jrfnl
Copy link
Contributor Author

jrfnl commented Dec 2, 2023

Closing as replaced by PHPCSStandards/PHP_CodeSniffer#83

@jrfnl jrfnl closed this Dec 2, 2023
@jrfnl jrfnl deleted the feature/psr2-controlstructurespacing-remove-t_else branch December 2, 2023 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants