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

Tokenizer/PHP: fix ? tokenization after attribute #3446

Commits on Oct 6, 2021

  1. Tokenizer/PHP: fix ? tokenization after attribute

    In a select set of circumstance, when a `?` would follow an attribute with a nested array in it, the `?` would be tokenized as `T_INLINE_THEN`, not `T_NULLABLE`.
    Fixed now.
    
    Includes unit test via the `PSR12.Operators.OperatorSpacing` sniff.
    
    Note: Ternary `?` vs nullable (and ternary `:` vs colon) should really get a full set of unit tests, but I don't currently have the time to set that up.
    
    Fixes 3445
    jrfnl committed Oct 6, 2021
    Copy the full SHA
    9362d14 View commit details
    Browse the repository at this point in the history