Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function __invoke(Request $request) |
||
19 | { |
||
20 | try { |
||
21 | $data = json_decode((string)$this->getList($request)->getBody(), true); |
||
22 | } catch (\IproSoftwareApi\Exceptions\IproSoftwareApiAccessTokenException $e) { |
||
23 | return Response::json([ |
||
24 | 'response' => (array) $e->getResponse(), |
||
25 | ], 500); |
||
26 | } |
||
27 | |||
28 | return Response::json([ |
||
29 | 'data' => $data, |
||
30 | ]); |
||
33 |