Skip to content

Commit

Permalink
support out-of-class MethodCalls in PhpDocUtil (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored Oct 6, 2022
1 parent 793e064 commit 59d5d8e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/PhpDoc/PhpDocUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ private static function getMethodReflection(CallLike $callike, Scope $scope): ?M
$classReflection = $scope->getClassReflection();
if (null !== $classReflection && $classReflection->hasMethod($callike->name->name)) {
$methodReflection = $classReflection->getMethod($callike->name->name, $scope);
} else {
$callerType = $scope->getType($callike->var);
$methodReflection = $scope->getMethodReflection($callerType, $callike->name->name);
}
}

Expand Down

0 comments on commit 59d5d8e

Please sign in to comment.