private static function injectGrants(AclAuthorization $acl, $grantType, array $rules)
    {
        foreach ($rules as $set) {
            if (! is_array($set) || ! isset($set['resource'])) {
                continue;
            }

            self::injectGrant($acl, $grantType, $set);
        }

        return $acl;
    }