Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
ValidationException
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getValidator
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Engelsystem\Http\Exceptions;
6
7use Engelsystem\Http\Validation\Validator;
8use RuntimeException;
9use Throwable;
10
11class 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}