Conditions | 2 |
Paths | 2 |
Total Lines | 6 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
32 | 5 | protected static function createStatic(string $message, ?\Throwable $previous): static |
|
33 | { |
||
34 | 5 | $previous instanceof self or throw new \InvalidArgumentException( |
|
35 | 5 | \sprintf('Previous exception must be an instance of %s', self::class), |
|
36 | 5 | ); |
|
37 | 5 | return new self($previous->reflection, $previous->parameter); |
|
38 | } |
||
40 |