Skip to content

Commit

Permalink
[ci-review] Rector Rectify
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Dec 17, 2022
1 parent 13c4730 commit a498497
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Reflection/ReflectionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,15 @@ private function resolveFunctionReflectionFromFuncCall(

if ($funcCall->name instanceof Name) {
if ($this->reflectionProvider->hasFunction($funcCall->name, $scope)) {
$function = $this->reflectionProvider->getFunction($funcCall->name, $scope);
$fileName = (string) $function->getFileName();
$functionReflection = $this->reflectionProvider->getFunction($funcCall->name, $scope);
$fileName = (string) $functionReflection->getFileName();

// function inside phpstan.phar may conflict with defined function
if (str_contains($fileName, 'phpstan.phar')) {
return null;
}

return $function;
return $functionReflection;
}

return null;
Expand Down

0 comments on commit a498497

Please sign in to comment.