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

Universal/DisallowLonelyIf: bow out early for a specific situation (PHP close tag) #169

Merged

Commits on Dec 1, 2022

  1. Universal/DisallowLonelyIf: bow out early for a specific situation (P…

    …HP close tag)
    
    If an inner "if/else" chain using alternative syntax has a PHP close tag after the `endif` instead of a semi-colon, we **know** there will need to be a PHP open tag before the closer for the "outer" `else` can be reached, so this means there will always be additional content within the outer `else` which doesn't belong with the inner `if`, i.e. it's not a lonely `if`.
    
    This commit implements bowing out early for that situation.
    
    Includes unit test.
    
    Includes minor tweaks to the inline documentation to make it clearer that the `do-while` code is part of the "Find the end of an if - else chain." block.
    jrfnl committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    09df531 View commit details
    Browse the repository at this point in the history