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
Never presume code-style and do things like ($stackPtr + 1) if you want to examine the next effective token.
Always use findNext()/findPrevious() in combination with Tokens::$emptyTokens instead. That will disregard whitespace, comment and PHPCS native whitelist comments (which have a separate token).
As for the above:
To get the name of a function based on the T_FUNCTION token - use $phpcsFile->getDeclarationName(). That function exists for a reason ;-)
To get the next effective token in isIncrementingToken():
Extracted from #1
I am bad with parsers and have no idea how to approach it, so this might take a while. 😅
The text was updated successfully, but these errors were encountered: