Skip to content

Commit

Permalink
Fix metrics return type
Browse files Browse the repository at this point in the history
  • Loading branch information
eliseekn committed Apr 19, 2024
1 parent 4d8ca38 commit 802339b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .idea/blade.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/LaravelMetrics.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ protected function withVariations(int $count = 1): int

$laravelMetrics = (new self(DB::table($this->table)))
->by($this->period, $count)
->aggregate($this->aggregate, str_replace($this->table . '.', '', $this->column));
->aggregate($this->aggregate, str_replace($this->table.'.', '', $this->column));

$result = match ($this->period) {
Period::DAY->value => $laravelMetrics
Expand Down Expand Up @@ -685,7 +685,7 @@ protected function populateMissingData(array $labels, array $data): array
/**
* Generate metrics data
*/
public function metrics(int $withVariationsCount = null): int|array
public function metrics(int $withVariationsCount = null): mixed
{
$metricsData = $this->metricsData();
$count = is_null($metricsData) ? 0 : ($metricsData->data ?? 0);
Expand Down

0 comments on commit 802339b

Please sign in to comment.