diff --git a/src/Analytics.php b/src/Analytics.php index 60ea232..3ae0ac9 100644 --- a/src/Analytics.php +++ b/src/Analytics.php @@ -228,7 +228,7 @@ public function get( $metricFilter ); } - + public function getRealtime( Period $period, array $metrics, diff --git a/src/AnalyticsClient.php b/src/AnalyticsClient.php index 62094df..e0e7164 100644 --- a/src/AnalyticsClient.php +++ b/src/AnalyticsClient.php @@ -6,8 +6,8 @@ use Google\Analytics\Data\V1beta\Dimension; use Google\Analytics\Data\V1beta\FilterExpression; use Google\Analytics\Data\V1beta\Metric; -use Google\Analytics\Data\V1beta\RunReportResponse; use Google\Analytics\Data\V1beta\RunRealtimeReportResponse; +use Google\Analytics\Data\V1beta\RunReportResponse; use Illuminate\Contracts\Cache\Repository; use Illuminate\Support\Collection; @@ -157,7 +157,6 @@ public function runRealtimeReport(array $request): RunRealtimeReportResponse ); } - public function getAnalyticsService(): BetaAnalyticsDataClient { return $this->service; diff --git a/src/OrderBy.php b/src/OrderBy.php index 8be3c37..add1e10 100644 --- a/src/OrderBy.php +++ b/src/OrderBy.php @@ -10,18 +10,18 @@ class OrderBy { public static function dimension(string $dimension, bool $descending = false): GoogleOrderBy { - $dimensionOrderBy = (new DimensionOrderBy())->setDimensionName($dimension); + $dimensionOrderBy = (new DimensionOrderBy)->setDimensionName($dimension); - return (new GoogleOrderBy())->setDimension( + return (new GoogleOrderBy)->setDimension( $dimensionOrderBy, )->setDesc($descending); } public static function metric(string $metric, bool $descending = false): GoogleOrderBy { - $metricOrderBy = (new MetricOrderBy())->setMetricName($metric); + $metricOrderBy = (new MetricOrderBy)->setMetricName($metric); - return (new GoogleOrderBy())->setMetric( + return (new GoogleOrderBy)->setMetric( $metricOrderBy, )->setDesc($descending); } diff --git a/src/Period.php b/src/Period.php index 3d8a979..990e7f0 100644 --- a/src/Period.php +++ b/src/Period.php @@ -61,7 +61,7 @@ public function __construct(DateTimeInterface $startDate, DateTimeInterface $end public function toDateRange(): DateRange { - return (new DateRange()) + return (new DateRange) ->setStartDate($this->startDate->format('Y-m-d')) ->setEndDate($this->endDate->format('Y-m-d')); }