Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function execute() |
||
18 | { |
||
19 | /** @var QueryBuilder $queryBuilder */ |
||
20 | $queryBuilder = $this->getFromResponse('query_builder'); |
||
21 | try { |
||
22 | $responseData = $queryBuilder->getQuery()->getSingleResult(); |
||
23 | } catch (NonUniqueResultException $exception) { |
||
24 | throw new BadRequestHttpException(); |
||
25 | } catch (NoResultException $exception) { |
||
26 | throw new NotFoundHttpException(); |
||
27 | } |
||
28 | |||
29 | return $this->createResponse(['response_data' => $responseData]); |
||
30 | } |
||
37 | } |