diff --git a/src/Analytics.php b/src/Analytics.php index 12ce35e..93d343b 100644 --- a/src/Analytics.php +++ b/src/Analytics.php @@ -4,6 +4,7 @@ use Carbon\Carbon; use Google_Service_Analytics; +use Google_Service_Analytics_GaData; use Illuminate\Support\Collection; use Illuminate\Support\Traits\Macroable; @@ -153,9 +154,9 @@ protected function summarizeTopBrowsers(Collection $topBrowsers, int $maxResults * @param string $metrics * @param array $others * - * @return array|null + * @return Google_Service_Analytics_GaData|array|null */ - public function performQuery(Period $period, string $metrics, array $others = []): array | null + public function performQuery(Period $period, string $metrics, array $others = []): Google_Service_Analytics_GaData | array | null { return $this->client->performQuery( $this->viewId, diff --git a/src/AnalyticsClient.php b/src/AnalyticsClient.php index d82b7a5..a4f1fc1 100644 --- a/src/AnalyticsClient.php +++ b/src/AnalyticsClient.php @@ -4,6 +4,7 @@ use DateTimeInterface; use Google_Service_Analytics; +use Google_Service_Analytics_GaData; use Illuminate\Contracts\Cache\Repository; class AnalyticsClient @@ -33,9 +34,9 @@ public function setCacheLifeTimeInMinutes(int $cacheLifeTimeInMinutes): self * @param string $metrics * @param array $others * - * @return array|null + * @return Google_Service_Analytics_GaData|array|null */ - public function performQuery(string $viewId, DateTimeInterface $startDate, DateTimeInterface $endDate, string $metrics, array $others = []): array | null + public function performQuery(string $viewId, DateTimeInterface $startDate, DateTimeInterface $endDate, string $metrics, array $others = []): Google_Service_Analytics_GaData | array | null { $cacheName = $this->determineCacheName(func_get_args());