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/PSR12/OperatorSpacing: bug fix - unary plus/minus in arrow function return #3129

Commits on Sep 29, 2020

  1. Squiz/PSR12/OperatorSpacing: bug fix - unary plus/minus in arrow func…

    …tion return
    
    A plus/minus directly after the arrow of an arrow function, will always be a unary plus/minus and should therefore be ignored by these sniffs.
    
    Includes unit tests.
    
    Includes two additional simplifications:
    * `T_DOUBLE_ARROW` is already part of the `Tokens::$assignmentTokens` array, so doesn't need to be added separately.
    * The cast tokens array was incomplete (missing `T_BINARY_CAST`) and can be replaced by the more complete `Tokens::$castTokens` array anyhow.
    
    Fixes 3043
    jrfnl committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    1b768c5 View commit details
    Browse the repository at this point in the history