Bug report
The use of @return template-type<T, ModelInterface, 'TValue'> on a function defined in a trait adapt the infered type to the using class in a way that creates errors for each possible use.
Code snippet that reproduces the problem
https://phpstan.org/r/dde1c228-ac3f-4660-9a5f-ecb53b439f7d
Expected output
No error.
Did PHPStan help you today? Did it make you happy in any way?
Yes, really helpful.
Bug report
The use of
@return template-type<T, ModelInterface, 'TValue'>on a function defined in a trait adapt the infered type to the using class in a way that creates errors for each possible use.Code snippet that reproduces the problem
https://phpstan.org/r/dde1c228-ac3f-4660-9a5f-ecb53b439f7d
Expected output
No error.
Did PHPStan help you today? Did it make you happy in any way?
Yes, really helpful.