We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I expect no error in https://psalm.dev/r/ca5cc043f0
Phpstan does not report this as an error https://phpstan.org/r/700d6a81-675e-4f91-9a6b-d042dc6dccd4
And psalm doesn't report this as an error with promoted properties https://psalm.dev/r/85122515f9
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php class Foo { private int $int; /** @psalm-pure */ public function __construct(int $int) { $this->int = $int; } } class Factory { /** @psalm-pure */ public function getFoo(): Foo { return new Foo(42); } }
Psalm output (using commit 16b24bd): ERROR: ImpureVariable - 10:9 - Cannot reference $this in a pure context
<?php class Foo { /** @psalm-pure */ public function __construct(private int $int) { } } class Factory { /** @psalm-pure */ public function getFoo(): Foo { return new Foo(42); } }
Psalm output (using commit 16b24bd): No issues!
Sorry, something went wrong.
ImpureVariable
Successfully merging a pull request may close this issue.
I expect no error in https://psalm.dev/r/ca5cc043f0
Phpstan does not report this as an error https://phpstan.org/r/700d6a81-675e-4f91-9a6b-d042dc6dccd4
And psalm doesn't report this as an error with promoted properties
https://psalm.dev/r/85122515f9
The text was updated successfully, but these errors were encountered: