public function setSortOrder($sortOrder)
    {
        if (!\in_array($sortOrder, ['ASC', 'DESC'])) {
            throw new \InvalidArgumentException(sprintf('The parameter $sortOrder must be one of "ASC" or "DESC", got "%s"', $sortOrder));
        }
        $this->sortOrder = $sortOrder;

        return $this;
    }
public function setSortOrder($sortOrder)
    {
        if (!\in_array($sortOrder, ['ASC', 'DESC'])) {
            throw new \InvalidArgumentException(sprintf('The parameter $sortOrder must be one of "ASC" or "DESC", got "%s"', $sortOrder));
        }
        $this->sortOrder = $sortOrder;

        return $this;
    }
public function setSortOrder ( $ sortOrder ) { if ( ! \ in_array ( $ sortOrder , [ 'ASC' , 'DESC' ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The parameter $sortOrder must be one of "ASC" or "DESC", got "%s"' , $ sortOrder ) ) ; } $ this -> sortOrder = $ sortOrder ; return $ this ; }
Set the sort ordering.

{@inheritdoc}

@param string $sortOrder (ASC|DESC)

@throws \InvalidArgumentException if $sortOrder is not one of ASC or DESC
Set the sort ordering .