| Conditions | 2 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function handle() |
||
| 28 | { |
||
| 29 | $errorData = Formatter::formatExceptionAsDataArray( |
||
| 30 | $this->getInspector(), |
||
| 31 | false |
||
| 32 | ); |
||
| 33 | |||
| 34 | $title = $this->getClassAsTitle($errorData["type"]); |
||
| 35 | |||
| 36 | $response = array( |
||
| 37 | 'error' => [ |
||
| 38 | "type" => $title, |
||
| 39 | "message" => $errorData["message"] |
||
| 40 | ] |
||
| 41 | ); |
||
| 42 | |||
| 43 | echo json_encode($response, defined('JSON_PARTIAL_OUTPUT_ON_ERROR') ? JSON_PARTIAL_OUTPUT_ON_ERROR : 0); |
||
| 44 | |||
| 45 | return Handler::QUIT; |
||
| 46 | } |
||
| 48 |