| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php namespace Pz\Doctrine\Rest\Action\Relationships; |
||
| 36 | 1 | public function handle($request) |
|
| 37 | { |
||
| 38 | 1 | $entity = $this->repository()->findById($request->getId()); |
|
| 39 | |||
| 40 | 1 | $this->authorize($request, $entity); |
|
| 41 | |||
| 42 | 1 | $this->setProperty($entity, $this->field(), null); |
|
| 43 | |||
| 44 | 1 | $this->repository()->getEntityManager()->flush($entity); |
|
| 45 | |||
| 46 | 1 | return $this->response()->noContent(); |
|
| 47 | } |
||
| 49 |