public function getValue($offset = null)
    {
        if (null === $offset) {
            $offset = $this->offset;
        }

        $token = $this->getToken($offset);

        if (!isset(self::$hasValue[$token[0]])) {
            throw LogicException::create(
                'Token #%d (%d) is not expected to have a value.',
                $offset,
                $token[0]
            );
        }

        switch ($token[0]) {
            case DocLexer::T_FALSE:
                return false;
            case DocLexer::T_FLOAT:
                return (float) $token[1];
            case DocLexer::T_INTEGER:
                return (int) $token[1];
            case DocLexer::T_IDENTIFIER:
            case DocLexer::T_STRING:
                return $token[1];
            case DocLexer::T_TRUE:
                return true;
        }

        return null;
    }
public function getValue($offset = null)
    {
        if (null === $offset) {
            $offset = $this->offset;
        }

        $token = $this->getToken($offset);

        if (!isset(self::$hasValue[$token[0]])) {
            throw LogicException::create(
                'Token #%d (%d) is not expected to have a value.',
                $offset,
                $token[0]
            );
        }

        switch ($token[0]) {
            case DocLexer::T_FALSE:
                return false;
            case DocLexer::T_FLOAT:
                return (float) $token[1];
            case DocLexer::T_INTEGER:
                return (int) $token[1];
            case DocLexer::T_IDENTIFIER:
            case DocLexer::T_STRING:
                return $token[1];
            case DocLexer::T_TRUE:
                return true;
        }

        return null;
    }
public function getValue ( $ offset = null ) { if ( null === $ offset ) { $ offset = $ this -> offset ; } $ token = $ this -> getToken ( $ offset ) ; if ( ! isset ( self :: $ hasValue [ $ token [ 0 ] ] ) ) { throw LogicException :: create ( 'Token #%d (%d) is not expected to have a value.' , $ offset , $ token [ 0 ] ) ; } switch ( $ token [ 0 ] ) { case DocLexer :: T_FALSE : return false ; case DocLexer :: T_FLOAT : return ( float ) $ token [ 1 ] ; case DocLexer :: T_INTEGER : return ( int ) $ token [ 1 ] ; case DocLexer :: T_IDENTIFIER : case DocLexer :: T_STRING : return $ token [ 1 ] ; case DocLexer :: T_TRUE : return true ; } return null ; }
Returns the processed value of the specified token.

@param integer $offset The token offset.

@return mixed The processed value.

@throws Exception
@throws LogicException If the token is not expected to have a value.
Returns the processed value of the specified token .