-
Notifications
You must be signed in to change notification settings - Fork 15
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
Incorrect warning for arguments to static methods that return "new static()" #272
Comments
Same here. The proposed workaround helps. |
Same here. But I get also false positives for code pieces like this:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After running
composer up
we received an updated version ofphpcs-variable-analysis
from v2.11.4 to v2.11.5 (no other PHP_CodeSniffer-related updates). Since then we're receiving warnings in custom services in our Drupal application:These warnings are about this code inside a PHP class:
We can work around the errors by explicitly naming the class we want to return (i.e.
return new ResultResponseController(
) but this will be inaccurate for some locations where this static::create
method exists in an abstract base class.Could this be caused by the recent change to static declaration checks (#267)?
The text was updated successfully, but these errors were encountered: