Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function execute() |
||
24 | { |
||
25 | /** @var \ReflectionClass $reflection */ |
||
26 | $reflection = $this->getFromResponse('reflection'); |
||
27 | $entity = $this->doctrine->getRepository($reflection->getName())->find($this->request->get('id', 0)); |
||
28 | |||
29 | if (!$entity) { |
||
30 | throw new NotFoundHttpException('Resource not found'); |
||
31 | } |
||
32 | |||
33 | return $this->createResponse(['entity' => $entity]); |
||
34 | } |
||
41 | } |