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

PSR12.Traits.UseDeclaration: check spacing after use keyword for multi-line statements + fix typo #3856

Commits on Jul 19, 2023

  1. PSR12.Traits.UseDeclaration: fix typo in error code

    The `processUseStatement()` method checking single-line trait `use` statements checks the spacing after the `use` keyword, but the error did not have the correct error code.
    jrfnl committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    bc674f1 View commit details
    Browse the repository at this point in the history
  2. PSR12.Traits.UseDeclaration: check spacing after use keyword for mu…

    …lti-line statements
    
    While the `processUseStatement()` method checking single-line trait `use` statements would check the spacing after the `use` keyword, the `processUseGroup()` method checking multi-line trait `use` statements did not execute that same check, while the rule applies to both single- as well as multi-line `use` statements.
    
    By moving the check for the spacing after the `use` keyword to the `process()` method, it will now be executed for both situations.
    
    Tested by adjusting a pre-existing test.
    jrfnl committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    7b0475b View commit details
    Browse the repository at this point in the history