Skip to content

Commit f9fb2f0

Browse files
authored
Merge pull request #76 from kodedjackson/fix/return-type-error
Fix TypeError in AnalyticsService::getUniqueVisitorCount
2 parents 65eb5e2 + 14aa071 commit f9fb2f0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Services/AnalyticsService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@ public function getPageViews(array $params, int $perPage = 50)
391391

392392
public function getUniqueVisitorCount($query): int
393393
{
394-
return (clone $query)
394+
return (int) ((clone $query)
395395
->select(DB::raw($this->getUniqueVisitorCountExpression()))
396-
->value('unique_visitor_count') ?? 0;
396+
->value('unique_visitor_count') ?? 0);
397397
}
398398

399399
public function getUniqueVisitorCountExpression(): string

0 commit comments

Comments
 (0)