src/ContainerParser/Parser/ScopeImportParser.php
protected function next()
    {
        if (!$this->currentToken()->isType(T::TOKEN_IMPORT))
        {
            throw $this->errorUnexpectedToken($this->currentToken());
        }

        $this->skipToken(); // skip the import keyword

        // the next token must be an identifier
        if (!$this->currentToken()->isType(T::TOKEN_IDENTIFIER))
        {
            throw $this->errorUnexpectedToken($this->currentToken());
        }

        $node = new ScopeImportNode;
        $node->setPath($this->currentToken()->getValue());

        // skip the path
        $this->skipToken();

        return $node;
    }
protected function next()
    {
        if (!$this->currentToken()->isType(T::TOKEN_IMPORT))
        {
            throw $this->errorUnexpectedToken($this->currentToken());
        }

        $this->skipToken(); // skip the import keyword

        // the next token must be an identifier
        if (!$this->currentToken()->isType(T::TOKEN_IDENTIFIER))
        {
            throw $this->errorUnexpectedToken($this->currentToken());
        }

        $node = new ScopeImportNode;
        $node->setPath($this->currentToken()->getValue());

        // skip the path
        $this->skipToken();

        return $node;
    }
Parse the next token

@return null|Node