| Total Complexity | 4 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 72.72% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | class ValidationReportBuilder implements ValidationReportBuilderInterface |
||
| 10 | { |
||
| 11 | protected bool $validationStatus; |
||
| 12 | |||
| 13 | protected array $ruleViolations = []; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @return $this |
||
| 17 | */ |
||
| 18 | 12 | public function withValidationStatus(bool $status): ValidationReportBuilderInterface |
|
| 19 | { |
||
| 20 | 12 | $this->validationStatus = $status; |
|
| 21 | |||
| 22 | 12 | return $this; |
|
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @return $this |
||
| 27 | */ |
||
| 28 | 6 | public function withRuleViolation(string $violation): ValidationReportBuilderInterface |
|
| 29 | { |
||
| 30 | 6 | $this->ruleViolations[] = $violation; |
|
| 31 | |||
| 32 | 6 | return $this; |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return $this |
||
| 37 | */ |
||
| 38 | public function withRuleViolations(array $violations): ValidationReportBuilderInterface |
||
| 43 | } |
||
| 44 | |||
| 45 | 12 | public function build(): ValidationReportInterface |
|
| 48 | } |
||
| 49 | } |
||
| 50 |