Skip to content

Commit

Permalink
Pass taxon to sort helper method as first arg
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaGallinari committed Jul 4, 2024
1 parent aa1f1b2 commit 70e2e43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Helper/SortHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/SortHelperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ public function retrieveSearchSorting(array $sortingQueryParams = []): array;
*
* @return array<string, string>
*/
public function retrieveTaxonSorting(array $sortingQueryParams = [], TaxonInterface $taxon): array;
public function retrieveTaxonSorting(TaxonInterface $taxon, array $sortingQueryParams = []): array;
}

0 comments on commit 70e2e43

Please sign in to comment.