DynamicMethodReturnTypeExtension - Accessing variable initialization information #4374
-
In this example: $query = MyModel::findBySql("");
$query->all(); I know the Second example, which was easier: MyModel::findBySql("")->all(); Here I accessed I acknowledge that this will not work if |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi, how is |
Beta Was this translation helpful? Give feedback.
Hi, how is
MyModel::findBySql
typehinted? Ideally it should returnMyModel
and you'd be done :) Feel free to post the MyModel (and possibly ancestors) to phpstan.org and we'll tag the code correctly so that it just works without an extension.