Skip to content

Commit 59d5d8e

Browse files
authored
support out-of-class MethodCalls in PhpDocUtil (#436)
1 parent 793e064 commit 59d5d8e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/PhpDoc/PhpDocUtil.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ private static function getMethodReflection(CallLike $callike, Scope $scope): ?M
6969
$classReflection = $scope->getClassReflection();
7070
if (null !== $classReflection && $classReflection->hasMethod($callike->name->name)) {
7171
$methodReflection = $classReflection->getMethod($callike->name->name, $scope);
72+
} else {
73+
$callerType = $scope->getType($callike->var);
74+
$methodReflection = $scope->getMethodReflection($callerType, $callike->name->name);
7275
}
7376
}
7477

0 commit comments

Comments
 (0)