Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
ValidationException | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getValidator | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace Engelsystem\Http\Exceptions; |
6 | |
7 | use Engelsystem\Http\Validation\Validator; |
8 | use RuntimeException; |
9 | use Throwable; |
10 | |
11 | class ValidationException extends RuntimeException |
12 | { |
13 | /** |
14 | * @param Throwable|null $previous |
15 | */ |
16 | public function __construct( |
17 | protected Validator $validator, |
18 | string $message = '', |
19 | int $code = 0, |
20 | Throwable $previous = null |
21 | ) { |
22 | parent::__construct($message, $code, $previous); |
23 | } |
24 | |
25 | public function getValidator(): Validator |
26 | { |
27 | return $this->validator; |
28 | } |
29 | } |