public function isType($tokenTypes)
    {
        if (is_array($tokenTypes)) {
            return in_array($this->getType(), $tokenTypes);
        }

        return $this->getType() === $tokenTypes;
    }
public function isType($tokenTypes)
    {
        if (is_array($tokenTypes)) {
            return in_array($this->getType(), $tokenTypes);
        }

        return $this->getType() === $tokenTypes;
    }
public function isType ( $ tokenTypes ) { if ( is_array ( $ tokenTypes ) ) { return in_array ( $ this -> getType ( ) , $ tokenTypes ) ; } return $ this -> getType ( ) === $ tokenTypes ; }
Compares token types.

@param mixed $tokenTypes

@return bool
Compares token types .