protected function setSorts(Jory $jory): void
    {
        $sorts = $this->getArrayValue($this->joryArray, 'srt');

        if ($sorts) {
            foreach ($sorts as $sort) {
                $order = 'asc';
                if (substr($sort, 0, 1) === '-') {
                    $order = 'desc';
                    $sort = substr($sort, 1);
                }
                try {
                    $jory->addSort(new Sort($sort, $order));
                } catch (JoryException $e) {
                    // This exception cannot be thrown here because we checked the data.
                    // Use empty try/catch to prevent IDE suggesting we should use a @throws tag.
                }
            }
        }
    }