*/ public function aggregate(): array { $pending = []; /** @var ProviderInterface $provider */ foreach ($this->providers as $provider) { if (!$provider->isConfigured()) { continue; } try { $pending[] = [$provider, $provider->startFetch()]; } catch (\Throwable $e) { $this->logger->warning(sprintf('%s fetch failed: %s', $provider::class, $e->getMessage()), ['exception' => $e]); } } $contributions = []; foreach ($pending as [$provider, $handle]) { try { foreach ($provider->resolveFetch($handle) as $date => $count) { $contributions[$date] = ($contributions[$date] ?? 0) + $count; } } catch (\Throwable $e) { $this->logger->warning(sprintf('%s fetch failed: %s', $provider::class, $e->getMessage()), ['exception' => $e]); } } return $contributions; } }