Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | 4 | public function transformException(\Exception $exception) |
|
27 | { |
||
28 | $data = array( |
||
29 | 4 | 'code' => $exception->getCode(), |
|
30 | 4 | 'message' => $exception->getMessage() |
|
31 | 4 | ); |
|
32 | |||
33 | 4 | if ($this->debug === true) { |
|
34 | 2 | $data['exception'] = get_class($exception); |
|
35 | 2 | $data['trace'] = $exception->getTraceAsString(); |
|
36 | 2 | } |
|
37 | |||
38 | 4 | return array('error' => $data); |
|
39 | } |
||
40 | } |
||
41 |