From 70e2e43ebd4c72b3209f6b0c9e20820bf694b639 Mon Sep 17 00:00:00 2001 From: Luca Gallinari Date: Thu, 4 Jul 2024 14:40:41 +0200 Subject: [PATCH] Pass taxon to sort helper method as first arg --- src/Helper/SortHelper.php | 2 +- src/Helper/SortHelperInterface.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Helper/SortHelper.php b/src/Helper/SortHelper.php index 092729d..d044a79 100644 --- a/src/Helper/SortHelper.php +++ b/src/Helper/SortHelper.php @@ -13,7 +13,7 @@ public function retrieveSearchSorting(array $sortingQueryParams = []): array return $sortingQueryParams; // If empty it will sort by _score desc as default } - public function retrieveTaxonSorting(array $sortingQueryParams = [], TaxonInterface $taxon): array + public function retrieveTaxonSorting(TaxonInterface $taxon, array $sortingQueryParams = []): array { if ($sortingQueryParams === []) { return ['position' => 'asc']; diff --git a/src/Helper/SortHelperInterface.php b/src/Helper/SortHelperInterface.php index a3b6db2..1441af2 100644 --- a/src/Helper/SortHelperInterface.php +++ b/src/Helper/SortHelperInterface.php @@ -20,5 +20,5 @@ public function retrieveSearchSorting(array $sortingQueryParams = []): array; * * @return array */ - public function retrieveTaxonSorting(array $sortingQueryParams = [], TaxonInterface $taxon): array; + public function retrieveTaxonSorting(TaxonInterface $taxon, array $sortingQueryParams = []): array; }