Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 1 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
17 | public function __construct($message, $code = 0, \Throwable $previous = null) |
||
18 | 73 | { |
|
19 | if ($message instanceof \Throwable) { |
||
20 | parent::__construct($message->getMessage(), $message->getCode(), $message); |
||
21 | return; |
||
22 | } |
||
23 | |||
24 | if ($code instanceof \Throwable) { |
||
25 | parent::__construct((string)$message, $code->getCode(), $code); |
||
26 | return; |
||
27 | } |
||
28 | |||
29 | parent::__construct((string)$message, (int)$code, $previous); |
||
30 | } |
||
32 |