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

Tools/BrainMonkeyRaceCondition: various improvements #336

Merged

Commits on Nov 4, 2023

  1. Configuration menu
    Copy the full SHA
    1b3d82e View commit details
    Browse the repository at this point in the history
  2. Tools/BrainMonkeyRaceCondition: decouple from WPCS sniff

    .... as extending the WPCS sniff is now no longer needed, as the utility functions we used from that sniff before, have all been replaced with utilities from PHPCSUtils.
    jrfnl committed Nov 4, 2023
    Configuration menu
    Copy the full SHA
    6ea3d9b View commit details
    Browse the repository at this point in the history
  3. Tools/BrainMonkeyRaceCondition: add tests with PHP 8.0+ named parameters

    The commit in PR 322 in which the function call retrieving the parameter was changed from the WPCS method to the PHPCSUtils method already added support for this.
    
    This commit just adds some tests to safeguard it.
    jrfnl committed Nov 4, 2023
    Configuration menu
    Copy the full SHA
    85c9bd1 View commit details
    Browse the repository at this point in the history
  4. Tools/BrainMonkeyRaceCondition: minor tweak

    As we're only looking for a _method_ in a _class_, this condition will never happen under normal circumstances, not even in case of live coding as the function declaration would not be recognized as a _method_ in that case, so the sniff would bow out before reaching this condition.
    
    All the same, there's always to possibility that this could happen if PHP adds some new syntax and the PHPCS tokenizer does not support it yet or if there is another Tokenizer issue, so I'm keeping the condition, but marking it as fine to ignore for code coverage.
    jrfnl committed Nov 4, 2023
    Configuration menu
    Copy the full SHA
    4731693 View commit details
    Browse the repository at this point in the history