Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
28 | public static function fromException(Throwable $previous, string $formula, string $message = null): FormulaEngineException |
||
29 | { |
||
30 | if ($message !== null) { |
||
31 | $message .= ': '; |
||
32 | } |
||
33 | |||
34 | $message .= $previous->getMessage(); |
||
35 | |||
36 | $exception = new static($message . ' : ' . $formula, 0, $previous); |
||
37 | $exception->formula = $formula; |
||
38 | |||
39 | return $exception; |
||
40 | } |
||
55 |