You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gsherwood
changed the title
Tokenizer bug: double arrow tokenized as T_STRING
Double arrow tokenized as T_STRING when placed after function named "fn"
Mar 9, 2020
The previous change also included the changing of the function name token into a string, which wasn't required for arrow functions, and actually caused a problem given it assumed the next token as a name. Even though the function being called is not actually an arrow function, that decision doesn't happen until processAdditional(), so it looks like one on the first pass.
jrfnl
changed the title
Double arrow tokenized as T_STRING when placed after function named "fn"
Double arrow tokenized as T_STRING when placed after non-arrow function "fn" keyword
Mar 9, 2020
Given the below code sample, PHP itself tokenizes the
=>
asT_DOUBLE_ARROW
, however, since PHPCS 3.5.4, PHPCS tokenizes it asT_STRING
.I haven't traced back yet which commit introduced this, nor figured out yet where to apply the fix.
https://3v4l.org/OXelC
Related to #2523
The text was updated successfully, but these errors were encountered: