| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php namespace Pz\Doctrine\Rest\Action; |
||
| 18 | 4 | public function handle($request) |
|
| 19 | { |
||
| 20 | 4 | $entity = $this->repository()->findById($request->getId()); |
|
| 21 | |||
| 22 | 2 | $this->authorize($request, $entity); |
|
| 23 | |||
| 24 | 2 | $resource = new Item($entity, $this->transformer()); |
|
| 25 | |||
| 26 | 2 | return RestResponseFactory::resource($request, $resource); |
|
| 27 | } |
||
| 29 |