Total Complexity | 2 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class ValidationException extends \RuntimeException |
||
14 | { |
||
15 | /** |
||
16 | * @var ConstraintViolationListInterface |
||
17 | */ |
||
18 | protected $violations; |
||
19 | |||
20 | /** |
||
21 | * ValidationException constructor. |
||
22 | * |
||
23 | * @param string $message |
||
24 | * @param int $code |
||
25 | * @param Throwable|null $previous |
||
26 | * @param ConstraintViolationListInterface|null $violations |
||
27 | */ |
||
28 | 4 | public function __construct( |
|
29 | string $message = "Invalid command", |
||
30 | int $code = 0, |
||
31 | Throwable $previous = null, |
||
32 | ConstraintViolationListInterface $violations = null |
||
33 | ) { |
||
34 | 4 | parent::__construct($message, $code, $previous); |
|
35 | |||
36 | 4 | $this->violations = $violations; |
|
37 | 4 | } |
|
38 | |||
39 | 2 | public function getViolations(): ?ConstraintViolationListInterface |
|
42 | } |
||
43 | } |
||
44 |