private function allAreGlobal(array $namespaces): bool
    {
        foreach ($namespaces as $namespace) {
            if ($namespace->name && $namespace->name->toString() !== '') {
                return false;
            }
        }
        return true;
    }