Total Complexity | 4 |
Total Lines | 26 |
Duplicated Lines | 0 % |
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 | public function __construct(array $errors) |
||
15 | { |
||
16 | $this->errors = $errors; |
||
17 | parent::__construct(self::MESSAGE); |
||
18 | } |
||
19 | |||
20 | public function getErrors(): array |
||
21 | { |
||
22 | return $this->errors; |
||
23 | } |
||
24 | |||
25 | public function getFirstErrors(): ?array |
||
28 | } |
||
29 | |||
30 | public function getFirstError(): ?string |
||
37 |