private function getSortClauses(ParameterCollectionInterface $parameterCollection, ?Location $parentLocation = null): array
    {
        $sortType = $parameterCollection->getParameter('sort_type')->getValue() ?? 'default';
        $sortDirection = $parameterCollection->getParameter('sort_direction')->getValue() ?? LocationQuery::SORT_DESC;

        if ($sortType === 'defined_by_parent' && $parentLocation !== null) {
            return $parentLocation->getSortClauses();
        }

        return [
            new self::$sortClauses[$sortType]($sortDirection),
        ];
    }