mageekguy\atoum\php\tokenizer::appendConstant PHP Method

appendConstant() private method

private appendConstant ( )
    private function appendConstant()
    {
        $this->currentIterator->appendConstant($this->currentNamespace = new iterators\phpConstant());
        $this->currentIterator = $this->currentNamespace;
        $inConstant = true;
        while ($inConstant === true) {
            $token = $this->tokens->current();
            switch ($token[0]) {
                case ';':
                case T_CLOSE_TAG:
                    $this->currentIterator = $this->currentIterator->getParent();
                    $inConstant = false;
                    break;
                default:
                    $this->currentIterator->append(new token($token[0], isset($token[1]) === false ? null : $token[1], isset($token[2]) === false ? null : $token[2]));
                    $this->tokens->next();
            }
            $inConstant = $inConstant && $this->tokens->valid();
        }
        return $this->tokens->valid() === false ? null : $this->tokens->current();
    }