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 | public function __construct( |
| 14 | protected Validator $validator, |
| 15 | string $message = '', |
| 16 | int $code = 0, |
| 17 | ?Throwable $previous = null |
| 18 | ) { |
| 19 | parent::__construct($message, $code, $previous); |
| 20 | } |
| 21 | |
| 22 | public function getValidator(): Validator |
| 23 | { |
| 24 | return $this->validator; |
| 25 | } |
| 26 | } |