Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function import() |
||
19 | { |
||
20 | $request = $this->app->request(); |
||
21 | $response = $this->app->response(); |
||
22 | |||
23 | $data = json_decode($request->getBody(), true); |
||
24 | $this->saver->save($data); |
||
25 | |||
26 | $response['Content-Type'] = 'application/json'; |
||
27 | $response->body(json_encode(['ok' => true])); |
||
28 | } |
||
29 | } |
||
30 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.