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

Docs: clarify the $matched_content parameter #2280

Merged
merged 1 commit into from
Jul 4, 2023

Commits on Jul 4, 2023

  1. Docs: clarify the $matched_content parameter

    When the `$matched_content` param is passed from the `AbstractFunctionRestrictionsSniff` or, by extension, from the `AbstractFunctionParameterSniff``, it will always already be in lowercase.
    
    When the `$matched_content` param is passed from the `AbstractClassRestrictionsSniff` sniff it will be in its original case.
    
    This commit updates the docs of all involved methods to include information about the case of the content of `$matched_content` to clarify this.
    
    Includes removing two unnecessary calls to `strtolower()` in child classes.
    
    Includes overloading the `process_matched_token()` method in the `AbstractClassRestrictionsSniff`, not because the code does anything different, but only to ensure the docblock annotates correctly that in child classes of that abstract the `$matched_content` will be in its original case.
    jrfnl committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    2f7c31f View commit details
    Browse the repository at this point in the history