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
Tokenizer/PHP: more context sensitive keyword fixes
PHPCS re-tokenizes the `self`, `parent`, `true`, `false` and `null` keywords to a PHPCS native token.
This re-tokenization did not take the following situations into account:
* Those keywords being used as function names when the function is declared to return by reference.
* Those keywords being used as a function call.
Additionally, the PHP native `T_STATIC` token would not be (re-)tokenized to `T_STRING` when used as a function call, though it was tokenized correctly when used as a method call..
While using the `static` keyword for a global function declaration is illegal in PHP, the tokenization in PHPCS should still be consistent.
This commit fixes those issues.
Includes additional unit tests.
0 commit comments