Open ignas2526 opened 3 years ago
I found these snippets:
Same mixin on several inheritance levels seems to confuse Psalm. Dropping @mixin Builder<TRelatedModel>
from HasOne
makes it all check fine: https://psalm.dev/r/10511f9007
I found these snippets:
I have a similar issue with @mixin and static
template:
I found these snippets:
I am trying to figure out how to set correct type hinting for Laravel classes. I believe that I've done it correctly, but Psalm keeps inferring wrong type. I'm not sure if its Psalm issue or I'm doing something wrong.
The code is simplified Laravel Eloquent relation. The return types of test1 - test4 methods in the class Something should match the ones specified in the docblock.
Note: I've added "@psalm-suppress InvalidReturnType" in couple places so that it won't complain about missing method implementation.
https://psalm.dev/r/7e5bb88835
Thanks for help.