original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Inject the ACL with the grants specified in the collection of rules.
  
  @param AclAuthorization $acl
  @param string $grantType Either "allow" or "deny".
  @param array $rules
  @return AclAuthorization
docstring_tokens: Inject the ACL with the grants specified in the collection of rules .