From 10f80dad8225caca58d286b580ebd27c2a0bf3fa Mon Sep 17 00:00:00 2001 From: Salvatore Scalzi Date: Fri, 25 Feb 2022 14:52:24 +0100 Subject: [PATCH] Sort DatePeriod after merge and unique (#4) Add Sort Collection --- src/Trend.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Trend.php b/src/Trend.php index 5a2c37b..02fb3a7 100755 --- a/src/Trend.php +++ b/src/Trend.php @@ -140,6 +140,7 @@ public function mapValuesToDates(Collection $values): Collection return $values ->merge($placeholders) ->unique('date') + ->sort() ->flatten(); }