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

Breadcrumb

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

function TokenIterator::endIndexOfLastRelevantToken

File

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

Class

TokenIterator

Namespace

PHPStan\PhpDocParser\Parser

Code

public function endIndexOfLastRelevantToken() : int {
    $endIndex = $this->currentTokenIndex();
    $endIndex--;
    while (in_array($this->tokens[$endIndex][Lexer::TYPE_OFFSET], $this->skippedTokenTypes, true)) {
        if (!isset($this->tokens[$endIndex - 1])) {
            break;
        }
        $endIndex--;
    }
    return $endIndex;
}
RSS feed
Powered by Drupal