mirror of
https://github.com/danog/phpdoc-parser.git
synced 2025-01-22 13:51:20 +01:00
Mark some TokenIterator methods as impure
This commit is contained in:
parent
2269e47626
commit
f9f5616cb2
@ -90,6 +90,7 @@ class TokenIterator
|
||||
}
|
||||
|
||||
|
||||
/** @phpstan-impure */
|
||||
public function tryConsumeTokenValue(string $tokenValue): bool
|
||||
{
|
||||
if ($this->tokens[$this->index][Lexer::VALUE_OFFSET] !== $tokenValue) {
|
||||
@ -106,6 +107,7 @@ class TokenIterator
|
||||
}
|
||||
|
||||
|
||||
/** @phpstan-impure */
|
||||
public function tryConsumeTokenType(int $tokenType): bool
|
||||
{
|
||||
if ($this->tokens[$this->index][Lexer::TYPE_OFFSET] !== $tokenType) {
|
||||
@ -132,6 +134,7 @@ class TokenIterator
|
||||
}
|
||||
|
||||
|
||||
/** @phpstan-impure */
|
||||
public function joinUntil(int ...$tokenType): string
|
||||
{
|
||||
$s = '';
|
||||
@ -153,6 +156,7 @@ class TokenIterator
|
||||
$this->index++;
|
||||
}
|
||||
|
||||
/** @phpstan-impure */
|
||||
public function forwardToTheEnd(): void
|
||||
{
|
||||
$lastToken = count($this->tokens) - 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user