Untitled
unknown
plain_text
2 years ago
684 B
9
Indexable
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;
}Editor is loading...