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

Squiz.Scope.MethodScope misses visibility keyword on previous line #3575

Commits on Mar 31, 2022

  1. Squiz/MethodScope: bugfix for unconventional spacing

    The `Squiz.Scope.MethodScope` sniff is intended to check whether each method has visibility declared, but would in actual fact also enforce that the visibility should be on the same line as the `function` keyword as it stopped searching for the visibility keyword once it reached the start of the line.
    
    Fixed now by using the `File::getMethodProperties()` method for determining visibility instead of searching with sniff specific logic.
    
    Includes unit test.
    jrfnl committed Mar 31, 2022
    Copy the full SHA
    10c10ac View commit details
    Browse the repository at this point in the history