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);
    }
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);
    }
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 ) ; }
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
Build a new Field sort clause from the given arguments .