Conditions | 4 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 4.5923 |
Changes | 0 |
1 | <?php |
||
30 | 1 | public function resolve() |
|
31 | { |
||
32 | 1 | if (is_string($this->exception) || !($this->exception instanceof \Throwable)) { |
|
33 | try { |
||
34 | 1 | $exception = new $this->exception; |
|
35 | } catch (\Exception $e) { |
||
36 | throw new CouldNotResolveStringException("Could not resolve the string to an exception. It probably requires additional arguments. try to pass it as an object to the dispatcher"); |
||
37 | } |
||
38 | } |
||
39 | 1 | return $exception; |
|
|
|||
40 | } |
||
44 |