Untitled
unknown
plain_text
a year ago
684 B
3
Indexable
Never
foreach ($response->getRows() as $row) { $statistic = new GoogleAnalyticsStatistics(); /** @var DateTimeImmutable $dateTime */ $dateTime = DateTimeImmutable::createFromFormat( 'Ymd', //RepeatedField comment on getValue method: need to add return type mixed (require update php version to 8.0) $row->getDimensionValues()->offsetGet(0)->getValue() /* @phpstan-ignore-line */ ); $statistic->date = $dateTime; $this->fillInStatisticsMetrics($response->getMetricHeaders(), $row->getMetricValues(), $statistic); $result[] = $statistic; }