Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TokenIterator.php

function TokenIterator::consumeTokenValue

*

Throws

ParserException

File

vendor/phpstan/phpdoc-parser/src/Parser/TokenIterator.php, line 165

Class

TokenIterator

Namespace

PHPStan\PhpDocParser\Parser

Code

public function consumeTokenValue(int $tokenType, string $tokenValue) : void {
    if ($this->tokens[$this->index][Lexer::TYPE_OFFSET] !== $tokenType || $this->tokens[$this->index][Lexer::VALUE_OFFSET] !== $tokenValue) {
        $this->throwError($tokenType, $tokenValue);
    }
    $this->index++;
    $this->skipIrrelevantTokens();
}
RSS feed
Powered by Drupal