original_string: public function generateLocationIdExcludeCriterion(array $excludeLocations)
      {
          $excludeCriterion = array();
          foreach ($excludeLocations as $location) {
              if (!$location instanceof Location) {
                  throw new InvalidArgumentType('excludeLocations', 'array of Location objects');
              }
  
              $excludeCriterion[] = new Criterion\LogicalNot(
                  new Criterion\LocationId($location->id)
              );
          }
  
          return new Criterion\LogicalAnd($excludeCriterion);
      }
code: public function generateLocationIdExcludeCriterion(array $excludeLocations)
      {
          $excludeCriterion = array();
          foreach ($excludeLocations as $location) {
              if (!$location instanceof Location) {
                  throw new InvalidArgumentType('excludeLocations', 'array of Location objects');
              }
  
              $excludeCriterion[] = new Criterion\LogicalNot(
                  new Criterion\LocationId($location->id)
              );
          }
  
          return new Criterion\LogicalAnd($excludeCriterion);
      }
code_tokens: public function generateLocationIdExcludeCriterion ( array $ excludeLocations ) { $ excludeCriterion = array ( ) ; foreach ( $ excludeLocations as $ location ) { if ( ! $ location instanceof Location ) { throw new InvalidArgumentType ( 'excludeLocations' , 'array of Location objects' ) ; } $ excludeCriterion [ ] = new Criterion \ LogicalNot ( new Criterion \ LocationId ( $ location -> id ) ) ; } return new Criterion \ LogicalAnd ( $ excludeCriterion ) ; }
docstring: Generates an exclude criterion based on locationIds.
  
  @param \eZ\Publish\API\Repository\Values\Content\Location[] $excludeLocations
  
  @return \eZ\Publish\API\Repository\Values\Content\Query\Criterion\LogicalNot[]
  
  @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType
docstring_tokens: Generates an exclude criterion based on locationIds .