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

[Hotfix] PHP Tokenizer: improve arrow function backfill consistency #2860

Commits on Feb 8, 2020

  1. PHP Tokenizer: improve arrow function backfill consistency

    This commit implements the proposal as outlined in 2859#issuecomment-583695917.
    
    The `fn` keyword will now only be tokenized as `T_FN` if it really is an arrow function, in which case it will also have the additional indexes set in the token array.
    
    In all other cases - including when the keyword is used in a function declaration for a named function or method -, it will be tokenized as `T_STRING`.
    
    Includes numerous additional unit tests.
    
    Includes removing the changes made to the `File::getDeclarationName()` function and the `AbstractPatternSniff` in commit 37dda44 as those are no longer necessary.
    
    Fixes squizlabs#2859
    jrfnl committed Feb 8, 2020
    Configuration menu
    Copy the full SHA
    2e3a010 View commit details
    Browse the repository at this point in the history