Typing of getOwnerRecord and Filament::getTenant()
I'm currently using larastan to make sure my code is clean and fully typed, but i find myself to have to do a lot of code comments to make sure the code is properly typed both for my editor and larastan. I'm talking about stuff like this:
and
is there any way to improve this, and be able to directly used Filament::getTenant and have it typed?
1 Reply
Considering these are all variable I don’t think there’s a better way. getTenant() could be any model. So there’s no way for phpstan to automatically know without the hint.