Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.3149 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | 2 | public function actionDefault($params) |
|
31 | { |
||
32 | try { |
||
33 | 2 | $response = $this->api->run($params); |
|
34 | 1 | } catch (ApiNetteException $e) { |
|
35 | Debugger::log($e, 'error'); |
||
36 | $response = new JsonApiResponse(IResponse::S500_INTERNAL_SERVER_ERROR, ['error' => 'Internal server error']); |
||
37 | } |
||
38 | 2 | $this->sendResponse($response); |
|
39 | } |
||
40 | } |
||
41 |