| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 68 | 8 | protected function throwableToArray (\Throwable $e) : array |
|
| 69 | { |
||
| 70 | $result = array( |
||
| 71 | 8 | 'type' => get_class($e), |
|
| 72 | 8 | 'message' => $e->getMessage(), |
|
| 73 | 8 | 'code' => $e->getCode() |
|
| 74 | ); |
||
| 75 | 8 | if ($this->debug) { |
|
| 76 | 4 | $result['location'] = sprintf("%s:%s", $e->getFile(), $e->getLine()); |
|
| 77 | } |
||
| 78 | |||
| 79 | 8 | return $result; |
|
| 80 | } |
||
| 81 | } |
||
| 82 |