| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | protected function resolveException($exception) :\Throwable |
||
| 35 | { |
||
| 36 | if (is_string($exception) || ! ($exception instanceof \Throwable)) { |
||
| 37 | try { |
||
| 38 | $exception = new $exception; |
||
| 39 | } catch (\Exception $e) { |
||
| 40 | throw new ResolveFailedException('Could not resolve the string to an exception. It probably requires additional arguments. Try to pass it as an object'); |
||
| 41 | } |
||
| 42 | } |
||
| 43 | |||
| 44 | return $exception; |
||
| 45 | } |
||
| 47 |