-
Notifications
You must be signed in to change notification settings - Fork 1.5k
SELF is not recognised as T_SELF token in: return new self #1245
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
Labels
Comments
michalbundyra
added a commit
to zendframework/zend-coding-standard
that referenced
this issue
Dec 15, 2016
…f approach for "new self" - see issue squizlabs/PHP_CodeSniffer#1245
gsherwood
added a commit
that referenced
this issue
Dec 21, 2016
I've fixed the tokenizer for this specific case. Thanks for the report. |
jrfnl
added a commit
to jrfnl/PHPCompatibility
that referenced
this issue
Dec 22, 2016
Fixes failing unit tests caused by changed behaviour of PHPCS > 2.7.1. See: * squizlabs/PHP_CodeSniffer@79cd3dc * squizlabs/PHP_CodeSniffer#1245
jrfnl
added a commit
to PHPCSStandards/PHPCSUtils
that referenced
this issue
May 17, 2024
….8.0 In PHPCS < 2.8.0, the `self` in `return new self` would be tokenized as `T_STRING`, not `T_SELF`. This commit adds a work-around to the utility method to handle the situation correctly. Includes a unit test covering the issue. Ref: squizlabs/PHP_CodeSniffer#1245
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In above,
self
is recognised asT_STRING
token, not asT_SELF
token.The text was updated successfully, but these errors were encountered: