31 lines
654 B
PHP
31 lines
654 B
PHP
<?php
|
|
|
|
namespace App\Support\Release;
|
|
|
|
final readonly class ValidationResult
|
|
{
|
|
public function __construct(
|
|
public string $module,
|
|
public string $check,
|
|
public string $status,
|
|
public array $metrics = [],
|
|
public array $warnings = [],
|
|
) {}
|
|
|
|
public function passed(): bool
|
|
{
|
|
return $this->status === 'pass';
|
|
}
|
|
|
|
public function toArray(): array
|
|
{
|
|
return [
|
|
'module' => $this->module,
|
|
'check' => $this->check,
|
|
'status' => $this->status,
|
|
'metrics' => $this->metrics,
|
|
'warnings' => $this->warnings,
|
|
];
|
|
}
|
|
}
|