original_string: private function buildFieldSortClause(array $values, $direction)
      {
          if (!array_key_exists(1, $values)) {
              throw new InvalidArgumentException(
                  'Field sort clause requires ContentType identifier'
              );
          }
  
          if (!array_key_exists(2, $values)) {
              throw new InvalidArgumentException(
                  'Field sort clause requires FieldDefinition identifier'
              );
          }
  
          return new Field($values[1], $values[2], $direction);
      }
code: private function buildFieldSortClause(array $values, $direction)
      {
          if (!array_key_exists(1, $values)) {
              throw new InvalidArgumentException(
                  'Field sort clause requires ContentType identifier'
              );
          }
  
          if (!array_key_exists(2, $values)) {
              throw new InvalidArgumentException(
                  'Field sort clause requires FieldDefinition identifier'
              );
          }
  
          return new Field($values[1], $values[2], $direction);
      }
code_tokens: private function buildFieldSortClause ( array $ values , $ direction ) { if ( ! array_key_exists ( 1 , $ values ) ) { throw new InvalidArgumentException ( 'Field sort clause requires ContentType identifier' ) ; } if ( ! array_key_exists ( 2 , $ values ) ) { throw new InvalidArgumentException ( 'Field sort clause requires FieldDefinition identifier' ) ; } return new Field ( $ values [ 1 ] , $ values [ 2 ] , $ direction ) ; }
docstring: Build a new Field sort clause from the given arguments.
  
  @throws \InvalidArgumentException
  
  @param array $values
  @param mixed $direction
  
  @return \eZ\Publish\API\Repository\Values\Content\Query\SortClause\Field
docstring_tokens: Build a new Field sort clause from the given arguments .