<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\Event\Verification;

final class EventCoreStatus
{
    public function __construct(
        private readonly bool $ok,
        private readonly array $checks,
        private readonly array $summary,
        private readonly array $issues = []
    ) {}

    public function ok(): bool { return $this->ok; }
    public function checks(): array { return $this->checks; }
    public function summary(): array { return $this->summary; }
    public function issues(): array { return $this->issues; }

    public function toArray(): array
    {
        return [
            'ok' => $this->ok,
            'checks' => $this->checks,
            'summary' => $this->summary,
            'issues' => $this->issues,
        ];
    }
}
