Total Complexity | 4 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | final class RequestValidationException extends RuntimeException |
||
10 | { |
||
11 | private const MESSAGE = 'Request model validation error'; |
||
12 | private array $errors; |
||
13 | |||
14 | 4 | public function __construct(array $errors) |
|
15 | { |
||
16 | 4 | $this->errors = $errors; |
|
17 | 4 | parent::__construct(self::MESSAGE); |
|
18 | 4 | } |
|
19 | |||
20 | 1 | public function getErrors(): array |
|
21 | { |
||
22 | 1 | return $this->errors; |
|
23 | } |
||
24 | |||
25 | 2 | public function getFirstErrors(): ?array |
|
28 | } |
||
29 | |||
30 | 1 | public function getFirstError(): ?string |
|
37 |