Skip to content

Commit

Permalink
Reuse the existing reflection and do it just once
Browse files Browse the repository at this point in the history
  • Loading branch information
spaze committed Jan 22, 2024
1 parent 0741bd1 commit 92e3305
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Calls/NewCalls.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,9 @@ public function processNode(Node $node, Scope $scope): array
$names[] = $interface->getName();
}
}
$definedIn = $reflection ? $reflection->getFileName() : null;

foreach ($names as $name) {
$classRef = $type->getClassReflection();
$definedIn = $classRef ? $classRef->getFileName() : null;
$name .= self::CONSTRUCT;
$errors = array_merge(
$errors,
Expand Down

0 comments on commit 92e3305

Please sign in to comment.