Conditions | 3 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 6 | public function __construct( |
|
22 | string $id, |
||
23 | Throwable $error, |
||
24 | array $buildStack = [], |
||
25 | Throwable $previous = null, |
||
26 | ) { |
||
27 | 6 | $message = sprintf( |
|
28 | 6 | 'Caught unhandled error "%s" while building "%s".', |
|
29 | 6 | $error->getMessage() === '' ? $error::class : $error->getMessage(), |
|
30 | 6 | implode('" -> "', $buildStack === [] ? [$id] : $buildStack) |
|
31 | 6 | ); |
|
32 | |||
33 | 6 | parent::__construct($message, 0, $previous); |
|
34 | } |
||
36 |