Skip to content

Commit

Permalink
Fix object to array conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
eliseekn committed Oct 31, 2023
1 parent aedb5ff commit 05475ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/LaravelMetrics.php
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,8 @@ public function trends(): array
->trendsData()
->toArray();

$trendsData = array_map(fn ($datum) => (array) $datum, $trendsData);

if (! $this->fillMissingData) {
$trendsData = $this->formatDate($trendsData);

Expand Down

0 comments on commit 05475ee

Please sign in to comment.