Files
MtoRagSystem/src/Eval/Dto/EvalResult.php
2026-04-22 22:03:23 +02:00

37 lines
815 B
PHP

<?php
declare(strict_types=1);
namespace App\Eval\Dto;
final readonly class EvalResult
{
/**
* @param array<int, string> $failures
* @param array<string, mixed> $details
*/
public function __construct(
public string $caseId,
public string $type,
public bool $passed,
public float $durationMs,
public array $failures = [],
public array $details = [],
) {
}
/**
* @return array<string, mixed>
*/
public function toArray(): array
{
return [
'case_id' => $this->caseId,
'type' => $this->type,
'passed' => $this->passed,
'duration_ms' => $this->durationMs,
'failures' => $this->failures,
'details' => $this->details,
];
}
}