From d15f89bd465d5b7c797fa8af2638f7d7bb60d6d8 Mon Sep 17 00:00:00 2001 From: lexx Date: Tue, 12 Dec 2023 18:11:00 +0200 Subject: [PATCH] sorting with rank only again --- src/Query/Query.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Query/Query.php b/src/Query/Query.php index e6a5834..39ef10e 100644 --- a/src/Query/Query.php +++ b/src/Query/Query.php @@ -106,13 +106,14 @@ final class Query return Edge::fromArray((array)$edgeData); - })->sortBy(['depth', 'asc'], ['rank', 'desc'])->values()->toArray(); + })->sortBy("rank")->values()->toArray(); $queryParentEdges = collect($parentEdges)->map(function ($edgeData) { + return Edge::fromArray((array)$edgeData); - })->sortBy(['depth', 'asc'], ['rank', 'desc'])->values()->toArray(); + })->sortBy("rank")->values()->toArray();