Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php namespace Pz\Doctrine\Rest\Action; |
||
14 | 1 | public function handle($request) |
|
15 | { |
||
16 | 1 | $entity = $this->repository()->findById($request->getId()); |
|
17 | |||
18 | 1 | $this->authorize($request, $entity); |
|
19 | |||
20 | 1 | $this->repository()->getEntityManager()->remove($entity); |
|
21 | 1 | $this->repository()->getEntityManager()->flush(); |
|
22 | |||
23 | 1 | return RestResponse::noContent(); |
|
24 | } |
||
26 |