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