Skip to content

Commit

Permalink
chore: fix internal typehints in Tokens (#7656)
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Jan 3, 2024
1 parent f1500e4 commit 588c764
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tokenizer/Tokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,7 @@ private function changeCodeHash(string $codeHash): void
private function registerFoundToken($token): void
{
// inlined extractTokenKind() call on the hot path
/** @var non-empty-string */
/** @var int|non-empty-string */
$tokenKind = $token instanceof Token
? ($token->isArray() ? $token->getId() : $token->getContent())
: (\is_array($token) ? $token[0] : $token);
Expand All @@ -1390,7 +1390,7 @@ private function registerFoundToken($token): void
private function unregisterFoundToken($token): void
{
// inlined extractTokenKind() call on the hot path
/** @var non-empty-string */
/** @var int|non-empty-string */
$tokenKind = $token instanceof Token
? ($token->isArray() ? $token->getId() : $token->getContent())
: (\is_array($token) ? $token[0] : $token);
Expand Down

0 comments on commit 588c764

Please sign in to comment.