Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | 2 | public function __construct( |
|
11 | public readonly mixed $value, |
||
12 | public readonly string $path, |
||
13 | Throwable $previous |
||
14 | ) { |
||
15 | 2 | $message = sprintf( |
|
16 | 2 | "Data validation failed for property \"%s\", invalid value: %s\n\n> %s", |
|
17 | 2 | $path, |
|
18 | 2 | var_export($value, true), |
|
19 | 2 | $previous->getMessage() |
|
20 | 2 | ); |
|
21 | |||
22 | 2 | parent::__construct($message, 0, $previous); |
|
23 | } |
||
25 |