Files
SkinbaseNova/app/Services/Adsense/AdsenseSyncResult.php
T
klevze ce0f278bac Add a read-only Google AdSense analytics module for admins.
Connect AdSense over OAuth, sync entities and daily reports locally, and show placement performance in the admin panel without calling the Management API from public pages.
2026-09-20 14:49:48 +02:00

33 lines
838 B
PHP

<?php
declare(strict_types=1);
namespace App\Services\Adsense;
final class AdsenseSyncResult
{
/**
* @param list<string> $failedReports
*/
public function __construct(
public string $accountDisplayName = '',
public string $from = '',
public string $to = '',
public int $adUnits = 0,
public int $customChannels = 0,
public int $totalRows = 0,
public int $adUnitRows = 0,
public int $customChannelRows = 0,
public int $platformRows = 0,
public int $countryRows = 0,
public array $failedReports = [],
public bool $entitiesSynced = false,
public bool $reconnectRequired = false,
) {}
public function succeeded(): bool
{
return ! $this->reconnectRequired && $this->failedReports === [];
}
}