PDepend\Source\Language\PHP\PHPTokenizerInternal::peekNext PHP Method

peekNext() public method

Returns the type of next token, after the current token. This method ignores all comments between the current and the next token.
Since: 0.9.12
public peekNext ( ) : integer
return integer
    public function peekNext()
    {
        $this->tokenize();
        $offset = 0;
        do {
            $type = $this->tokens[$this->index + ++$offset]->type;
        } while ($type == Tokens::T_COMMENT || $type == Tokens::T_DOC_COMMENT);
        return $type;
    }