PHPDoc tag @var for property fooRepo contains generic type FooRepository<Foo> but class FooRepository is not generic #4345
Answered
by
ondrejmirtes
AnjaLiebermann
asked this question in
Support
-
In my Symfony4 project I have installed
and when I run phpstan it complains that
My class TestimonialRepository does exist and contains some additional methods. My notation in the calling class looks like this:
I tried checkGenericClassInNonGenericObjectType: false in the phpstan.neon file, but it does change nothing. If I remove the phpDoc, then phpstan complains, that it doesn't know the additional methods. What do I have to do to let phpstan accept the code?
|
Beta Was this translation helpful? Give feedback.
Answered by
ondrejmirtes
Jan 9, 2021
Replies: 1 comment 12 replies
-
Can you post the code of TestimonialRepository? |
Beta Was this translation helpful? Give feedback.
12 replies
Answer selected by
ondrejmirtes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you post the code of TestimonialRepository?