Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 77.78% |
Changes | 0 |
1 | <?php |
||
7 | class ValidationReport implements ValidationReportInterface |
||
8 | { |
||
9 | protected bool $validationStatus; |
||
10 | |||
11 | protected array $ruleViolations = []; |
||
12 | |||
13 | 12 | public function __construct(bool $status, string ...$violations) |
|
14 | { |
||
15 | 12 | $this->validationStatus = $status; |
|
16 | 12 | $this->ruleViolations = $violations; |
|
17 | } |
||
18 | |||
19 | 12 | public function validationStatus(): bool |
|
20 | { |
||
21 | 12 | return $this->validationStatus; |
|
22 | } |
||
23 | |||
24 | /** |
||
25 | * @return array<int,string> |
||
26 | */ |
||
27 | 6 | public function ruleViolations(): array |
|
30 | } |
||
31 | |||
32 | public static function voided(): ValidationReportInterface |
||
35 | } |
||
36 | } |
||
37 |