<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\Event\Compiler;

final class EventCompilerReport
{
    public function __construct(
        private readonly string $generatedAt,
        private readonly array $stages,
        private readonly array $artifacts,
        private readonly array $warnings,
        private readonly array $metadata = []
    ) {}

    public function toArray(): array
    {
        return [
            'generatedAt' => $this->generatedAt,
            'stages' => $this->stages,
            'artifacts' => $this->artifacts,
            'warnings' => $this->warnings,
            'metadata' => $this->metadata,
        ];
    }
}
