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;
    }
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;
    }
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 ; }
Namespaces all the permissions.

@param IPermission[] $permissions
@param string        $namespace

@return IPermission[]
Namespaces all the permissions .