How to resolve a type of an inheritetd property #11034
-
Hello, https://phpstan.org/r/1672ec76-63cb-4bcf-af99-dc4df6421f64 Yii2 does not have a
I think that maybe some kind of a Properties class reflection extensions might help, but i'm not sure it is really designed for this kind of cases. Obviously, i need some kind of custom rule or an extension. But i have no idea what exactly i'm looking for. Please advise how you would solve this problem, maybe with some examples to look into. Thanks. The best approach i've come up with is to somehow find a controller which uses an Action, check what type of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can use this extension to basically override anything: https://apiref.phpstan.org/1.11.x/PHPStan.Type.ExpressionTypeResolverExtension.html If you want to override the type of property, write some logic if |
Beta Was this translation helpful? Give feedback.
You can use this extension to basically override anything: https://apiref.phpstan.org/1.11.x/PHPStan.Type.ExpressionTypeResolverExtension.html
If you want to override the type of property, write some logic if
PropertyFetch
is given as the$expr
parameter. Otherwise returnnull
.