private function getArray()
    {
        $this->match(DocLexer::T_OPEN_CURLY_BRACES);

        $tokens = array(
            array(DocLexer::T_OPEN_CURLY_BRACES)
        );

        // check if empty array, bail early if it is
        if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) {
            $this->match(DocLexer::T_CLOSE_CURLY_BRACES);

            $tokens[] = array(DocLexer::T_CLOSE_CURLY_BRACES);

            return $tokens;
        }

        // collect the first value
        $tokens = array_merge($tokens, $this->getArrayEntry());

        // collect the remaining values
        while ($this->lexer->isNextToken(DocLexer::T_COMMA)) {
            $this->match(DocLexer::T_COMMA);

            $tokens[] = array(DocLexer::T_COMMA);

            if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) {
                break;
            }

            $tokens = array_merge($tokens, $this->getArrayEntry());
        }

        // end the collection
        $this->match(DocLexer::T_CLOSE_CURLY_BRACES);

        $tokens[] = array(DocLexer::T_CLOSE_CURLY_BRACES);

        return $tokens;
    }
private function getArray()
    {
        $this->match(DocLexer::T_OPEN_CURLY_BRACES);

        $tokens = array(
            array(DocLexer::T_OPEN_CURLY_BRACES)
        );

        // check if empty array, bail early if it is
        if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) {
            $this->match(DocLexer::T_CLOSE_CURLY_BRACES);

            $tokens[] = array(DocLexer::T_CLOSE_CURLY_BRACES);

            return $tokens;
        }

        // collect the first value
        $tokens = array_merge($tokens, $this->getArrayEntry());

        // collect the remaining values
        while ($this->lexer->isNextToken(DocLexer::T_COMMA)) {
            $this->match(DocLexer::T_COMMA);

            $tokens[] = array(DocLexer::T_COMMA);

            if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) {
                break;
            }

            $tokens = array_merge($tokens, $this->getArrayEntry());
        }

        // end the collection
        $this->match(DocLexer::T_CLOSE_CURLY_BRACES);

        $tokens[] = array(DocLexer::T_CLOSE_CURLY_BRACES);

        return $tokens;
    }
private function getArray ( ) { $ this -> match ( DocLexer :: T_OPEN_CURLY_BRACES ) ; $ tokens = array ( array ( DocLexer :: T_OPEN_CURLY_BRACES ) ) ; // check if empty array, bail early if it is if ( $ this -> lexer -> isNextToken ( DocLexer :: T_CLOSE_CURLY_BRACES ) ) { $ this -> match ( DocLexer :: T_CLOSE_CURLY_BRACES ) ; $ tokens [ ] = array ( DocLexer :: T_CLOSE_CURLY_BRACES ) ; return $ tokens ; } // collect the first value $ tokens = array_merge ( $ tokens , $ this -> getArrayEntry ( ) ) ; // collect the remaining values while ( $ this -> lexer -> isNextToken ( DocLexer :: T_COMMA ) ) { $ this -> match ( DocLexer :: T_COMMA ) ; $ tokens [ ] = array ( DocLexer :: T_COMMA ) ; if ( $ this -> lexer -> isNextToken ( DocLexer :: T_CLOSE_CURLY_BRACES ) ) { break ; } $ tokens = array_merge ( $ tokens , $ this -> getArrayEntry ( ) ) ; } // end the collection $ this -> match ( DocLexer :: T_CLOSE_CURLY_BRACES ) ; $ tokens [ ] = array ( DocLexer :: T_CLOSE_CURLY_BRACES ) ; return $ tokens ; }
Returns the tokens for the next array of values.

@return array The tokens.
Returns the tokens for the next array of values .