| Conditions | 3 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3.0541 |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 40 | 2 | public function handle() |
|
| 41 | { |
||
| 42 | $response = array( |
||
| 43 | 2 | 'error' => Formatter::formatExceptionAsDataArray( |
|
| 44 | 2 | $this->getInspector(), |
|
| 45 | 2 | $this->addTraceToOutput() |
|
| 46 | 2 | ), |
|
| 47 | 2 | ); |
|
| 48 | |||
| 49 | 2 | if (\Whoops\Util\Misc::canSendHeaders()) { |
|
| 50 | header('Content-Type: application/json'); |
||
| 51 | } |
||
| 52 | |||
| 53 | 2 | echo json_encode($response, defined('JSON_PARTIAL_OUTPUT_ON_ERROR') ? JSON_PARTIAL_OUTPUT_ON_ERROR : 0); |
|
| 54 | |||
| 55 | 2 | return Handler::QUIT; |
|
| 56 | } |
||
| 57 | } |
||
| 58 |