src/TokenStream.php
public function nextIfLookaheadAnyOf(array $types): bool
    {
        if (!isset($this->tokens[$this->position]) || !$this->tokens[$this->position]->typeEqualsAnyOf($types)) {
            return false;
        }

        $this->next();
        return true;
    }
public function nextIfLookaheadAnyOf(array $types): bool
    {
        if (!isset($this->tokens[$this->position]) || !$this->tokens[$this->position]->typeEqualsAnyOf($types)) {
            return false;
        }

        $this->next();
        return true;
    }
public function nextIfLookaheadAnyOf ( array $ types ) : bool { if ( ! isset ( $ this -> tokens [ $ this -> position ] ) || ! $ this -> tokens [ $ this -> position ] -> typeEqualsAnyOf ( $ types ) ) { return false ; } $ this -> next ( ) ; return true ; }
If the lookahead token type matches any of the given types, move to the next token.

@param int[] $types

@return bool
If the lookahead token type matches any of the given types move to the next token .