Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
24 | 3 | public static function fromException(string $message, Throwable ...$exception): self |
|
25 | { |
||
26 | 3 | if (count($exception) === 1) { |
|
27 | 2 | return new self($message, 0, $exception[0] ?? null); |
|
28 | } |
||
29 | |||
30 | 1 | $me = new self($message); |
|
31 | 1 | $me->exceptionList = $exception; |
|
32 | |||
33 | 1 | return $me; |
|
34 | } |
||
35 | |||
44 |