<?php

namespace App\Tests\Domain\Scraping\Adapter;

use App\Domain\Scraping\Domain\Contract\Repository\ContentSourceForHealthCheckInterface;
use App\Domain\Scraping\Domain\Model\ValueObject\ContentSourceHealthCheckData;

class InMemoryContentSourceForHealthCheckRepository implements ContentSourceForHealthCheckInterface
{
    /** @var ContentSourceHealthCheckData[] */
    private array $sources = [];

    public function add(ContentSourceHealthCheckData $data): void
    {
        $this->sources[] = $data;
    }

    public function getAll(): array
    {
        return $this->sources;
    }

    public function clear(): void
    {
        $this->sources = [];
    }
}
