@@ -21,13 +21,13 @@ discard block |
||
| 21 | 21 | $orderBy = $this->getOrderBy($options['sort']); |
| 22 | 22 | $resultSets = $manager->findBy([], $orderBy, $options['limit'], $options['offset']); |
| 23 | 23 | } catch (\Exception $e) { |
| 24 | - return new JsonResponse(["payload" => $e->getMessage()], 400);//400 |
|
| 24 | + return new JsonResponse(["payload" => $e->getMessage()], 400); //400 |
|
| 25 | 25 | } |
| 26 | 26 | if (empty($resultSets)) { |
| 27 | 27 | return new JsonResponse([]); |
| 28 | 28 | } |
| 29 | 29 | $retour = array_map( |
| 30 | - function ($element) use ($manager, $options) { |
|
| 30 | + function($element) use ($manager, $options) { |
|
| 31 | 31 | return $manager->toArray($element, $this->getFields($options['fields'])); |
| 32 | 32 | }, |
| 33 | 33 | $resultSets |
@@ -43,14 +43,14 @@ discard block |
||
| 43 | 43 | $options = $this->resolveParams()->resolve($request->query->all()); |
| 44 | 44 | $template = $manager->findOneBy(['id' => $request->get('id')]); |
| 45 | 45 | } catch (\Exception $e) { |
| 46 | - return new JsonResponse(["payload" => $e->getMessage()], 400);//400 |
|
| 46 | + return new JsonResponse(["payload" => $e->getMessage()], 400); //400 |
|
| 47 | 47 | } |
| 48 | 48 | if (!$template instanceof Template) { |
| 49 | 49 | return new JsonResponse([], 404); |
| 50 | 50 | } |
| 51 | 51 | $retour = $manager->toArray($template, $this->getFields($options['fields'])); |
| 52 | 52 | |
| 53 | - return new JsonResponse($retour);//400, 404 |
|
| 53 | + return new JsonResponse($retour); //400, 404 |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | public function postAction(Request $request) |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $template->setUuid((\Ramsey\Uuid\Uuid::uuid4())->toString()); |
| 66 | 66 | $manager->insert($template); |
| 67 | 67 | |
| 68 | - return new JsonResponse([], 201);//400 |
|
| 68 | + return new JsonResponse([], 201); //400 |
|
| 69 | 69 | } |
| 70 | 70 | } catch (\Exception $e) { |
| 71 | 71 | return new JsonResponse(["payload" => $e->getMessage()], 400); |