<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\DI\Compiler;

final class CompilerReport
{
    public function __construct(
        private readonly string $generatedAt,
        private readonly int $definitions,
        private readonly array $stages,
        private readonly array $warnings,
        private readonly string $outputFile = '',
        private readonly array $metadata = []
    ) {}

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