Skip to content
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

Don't emit UnnecessaryVarAnnotation for @phpstan-var #8610

Open
dkarlovi opened this issue Oct 22, 2022 · 0 comments
Open

Don't emit UnnecessaryVarAnnotation for @phpstan-var #8610

dkarlovi opened this issue Oct 22, 2022 · 0 comments

Comments

@dkarlovi
Copy link
Contributor

dkarlovi commented Oct 22, 2022

ERROR: UnnecessaryVarAnnotation - src/Xezilaires/Serializer/ObjectSerializer.php:39:25 - The @var object annotation for $object is unnecessary (see https://psalm.dev/212)
         * @phpstan-var object $object

The annotation was added because PHPStan's plugin doesn't infer the type correctly yet, but Psalm does. In this specific case, Psalm shoudn't emit the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants