public static function namespaceAll(array $permissions, string $namespace) : array
    {
        InvalidArgumentException::verifyAllInstanceOf(__METHOD__, 'permissions', $permissions, IPermission::class);

        $namespacedPermissions = [];

        foreach ($permissions as $permission) {
            $permission = $permission->inNamespace($namespace);

            $namespacedPermissions[$permission->getName()] = $permission;
        }

        return $namespacedPermissions;
    }