Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Apr 22, 2023
1 parent 24e736e commit d975304
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/PhpParser/NodeFinder/LocalConstantFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public function match(ClassConstFetch $classConstFetch): ?Const_
return null;
}

$constatName = $this->nodeNameResolver->getName($classConstFetch->name);
if ($constatName === null) {
$constantName = $this->nodeNameResolver->getName($classConstFetch->name);
if ($constantName === null) {
return null;
}

Expand All @@ -42,14 +42,14 @@ public function match(ClassConstFetch $classConstFetch): ?Const_
return null;
}

return $this->findConstantByName($class, $constatName);
return $this->findConstantByName($class, $constantName);
}

private function findConstantByName(Class_ $class, string $constatName): ?Const_
private function findConstantByName(Class_ $class, string $constantName): ?Const_
{
foreach ($class->getConstants() as $classConsts) {
foreach ($classConsts->consts as $const) {
if (! $this->nodeNameResolver->isName($const->name, $constatName)) {
if (! $this->nodeNameResolver->isName($const->name, $constantName)) {
continue;
}

Expand Down

0 comments on commit d975304

Please sign in to comment.