Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | 2 | public function __invoke( |
|
16 | 2 | Request $request, |
|
17 | 1 | Response $response, |
|
18 | array $args |
||
19 | 1 | ): Response { |
|
20 | $input = (array) $request->getParsedBody(); |
||
21 | $userIdLogged = (int) $this->getAndValidateUserId($input); |
||
22 | $id = (int) $args['id']; |
||
23 | $this->checkUserPermissions($id, $userIdLogged); |
||
24 | $this->getServiceDeleteUser()->delete($id); |
||
25 | |||
26 | return $this->jsonResponse($response, 'success', null, 204); |
||
27 | } |
||
29 |