Skip to content

Commit

Permalink
Fix exception in case of non-existent class
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar authored Jul 4, 2024
1 parent 1461d89 commit b04e68d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Collector/MethodCallCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,12 @@ private function registerStaticCall(
$callerType = $scope->getType($staticCall->class);
$classReflections = $this->getReflectionsWithMethod($callerType, $methodName);
} else {
$classReflections = [
$this->reflectionProvider->getClass($scope->resolveName($staticCall->class)),
];
$className = $scope->resolveName($staticCall->class);
if ($this->reflectionProvider->hasClass($className)) {
$classReflections = [
$this->reflectionProvider->getClass($className),
];
}
}

$result = [];
Expand Down

0 comments on commit b04e68d

Please sign in to comment.