Skip to content

Commit

Permalink
TASK: Add correct types ArrayHelper::sortByPropertyPath
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Apr 20, 2024
1 parent 1912e47 commit 47151a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Neos.Neos/Classes/Fusion/Helper/ArrayHelper.php
Expand Up @@ -97,8 +97,10 @@ public function groupBy($set, $groupingKey)

/**
* Sorts the input array by the $positionProperty of each element.
* @param array<mixed> $set
* @return array<mixed>
*/
public function sortByPropertyPath(array $set, $positionPropertyPath = 'position'): array
public function sortByPropertyPath(array $set, string $positionPropertyPath = 'position'): array
{
return (new PositionalArraySorter($set, $positionPropertyPath))->toArray();
}
Expand Down

0 comments on commit 47151a2

Please sign in to comment.