Total Complexity | 6 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Coverage | 38.46% |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
7 | final class CompositeCheckError extends CheckError |
||
8 | { |
||
9 | /** |
||
10 | * @var array<ValidationError> |
||
11 | */ |
||
12 | protected array $nestedErrors; |
||
13 | |||
14 | /** |
||
15 | * @param string $name |
||
16 | * @param mixed $value |
||
17 | * @param array<ValidationError> $errors |
||
18 | */ |
||
19 | 9 | public function __construct(string $name, $value, array $errors) |
|
20 | { |
||
21 | 9 | parent::__construct($name, $value, []); |
|
22 | 9 | $this->nestedErrors = $errors; |
|
23 | } |
||
24 | |||
25 | /** |
||
26 | * @return array<ValidationError> |
||
27 | */ |
||
28 | 9 | public function getNestedErrors(): array |
|
31 | } |
||
32 | |||
33 | /** |
||
34 | * @param CheckError $error |
||
35 | * |
||
36 | * @return bool |
||
37 | */ |
||
38 | public function equalTo(CheckError $error): bool |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @param CompositeCheckError $error |
||
47 | * |
||
48 | * @return bool |
||
49 | */ |
||
50 | protected function hasSameNestedErrorsWith(CompositeCheckError $error): bool |
||
58 |