Skip to content

Commit fcbba58

Browse files
sreicheltmotyl
authored andcommitted
Update MethodReturnTypeDetector.php for phpstan 2
1 parent 2b796db commit fcbba58

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Type/Mage/MethodReturnTypeDetector.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ protected function getTypeFromExpr(MethodReflection $methodReflection, $methodCa
4343
{
4444
$argument = $methodCall->getArgs()[0] ?? null;
4545
if ($argument === null || ! $argument->value instanceof String_) {
46-
return ParametersAcceptorSelector::selectSingle($methodReflection->getVariants())->getReturnType();
46+
return ParametersAcceptorSelector::selectFromArgs(
47+
$scope,
48+
$methodCall->getArgs(),
49+
$methodReflection->getVariants()
50+
)->getReturnType();
4751
}
4852

4953
$modelName = $argument->value->value;

0 commit comments

Comments
 (0)