src/Eloquent/Typhoon/ClassMapper/ClassMapper.php
protected function parseNamespaceName(array &$tokens)
    {
        $this->typeCheck->parseNamespaceName(func_get_args());

        $namespaceAtoms = array();
        do {
            $token = next($tokens);

            switch ($token[0]) {
                case T_STRING:
                    $namespaceAtoms[] = $token[1];
                    break;
            }
        } while (
            T_STRING === $token[0]
            || T_NS_SEPARATOR === $token[0]
            || T_WHITESPACE === $token[0]
        );

        return ClassName::fromAtoms($namespaceAtoms, true);
    }
protected function parseNamespaceName(array &$tokens)
    {
        $this->typeCheck->parseNamespaceName(func_get_args());

        $namespaceAtoms = array();
        do {
            $token = next($tokens);

            switch ($token[0]) {
                case T_STRING:
                    $namespaceAtoms[] = $token[1];
                    break;
            }
        } while (
            T_STRING === $token[0]
            || T_NS_SEPARATOR === $token[0]
            || T_WHITESPACE === $token[0]
        );

        return ClassName::fromAtoms($namespaceAtoms, true);
    }
@param array<string|array> &$tokens

@return ClassName