Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
35 | public function run($id) |
||
36 | { |
||
37 | $this->checkRepository(); |
||
38 | |||
39 | $item = $this->repository->find($id); |
||
40 | |||
41 | if (!$this->authUserService->canDeleteUser($item)) { |
||
42 | throw new ForbiddenException('Do not have permission to update this user'); |
||
43 | } |
||
44 | |||
45 | $item = $this->repository->delete($id); |
||
46 | |||
47 | return $item; |
||
48 | } |
||
49 | } |
||
50 |