Skip to content

Commit

Permalink
Reuse the existing reflection and do it just once (#246)
Browse files Browse the repository at this point in the history
This is very minor speedup, almost definitely and totally not even worth mentioning here, maybe.
  • Loading branch information
spaze authored Jan 22, 2024
2 parents 0741bd1 + 92e3305 commit ce98abe
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 ce98abe

Please sign in to comment.