Skip to content

Commit

Permalink
remove deprecated NodeNameResolver::isCaseSensitiveName()
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jun 3, 2024
1 parent f7dcbb3 commit 95cde9d
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/NodeNameResolver/NodeNameResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,28 +87,6 @@ public function isName(Node | array $node, string $name): bool
return false;
}

/**
* @api
* @deprecated This method is unused and will be removed, go for isName() instead
*/
public function isCaseSensitiveName(Node $node, string $name): bool
{
if ($name === '') {
return false;
}

if ($node instanceof CallLike && ! $node instanceof FuncCall) {
return false;
}

$resolvedName = $this->getName($node);
if ($resolvedName === null) {
return false;
}

return $name === $resolvedName;
}

/**
* Some nodes have always-known string name. This makes PHPStan smarter.
* @see https://phpstan.org/writing-php-code/phpdoc-types#conditional-return-types
Expand Down

0 comments on commit 95cde9d

Please sign in to comment.