Conditions | 2 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function execute() |
||
25 | { |
||
26 | $entity = $this->getFromResponse('entity'); |
||
27 | |||
28 | try { |
||
29 | $this->manager->persist($entity); |
||
30 | $this->manager->flush(); |
||
31 | } catch (\Exception $exception) { |
||
32 | throw new BadRequestHttpException('Your request can not be stored', $exception); |
||
33 | } |
||
34 | |||
35 | return $this->createResponse(['response_data' => $entity]); |
||
36 | } |
||
44 | } |