Passed
Push — master ( aedd7e...5ec21e )
by Luiz Kim
02:30
created
src/Controller/AddAppConfigAction.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -18,31 +18,31 @@
 block discarded – undo
18 18
 
19 19
 class AddAppConfigAction
20 20
 {
21
-  public function __construct(
21
+    public function __construct(
22 22
     private Security $security,
23 23
     private EntityManagerInterface $manager,
24 24
     private ConfigService $configService,
25 25
     private HydratorService $hydratorService
26
-  ) {}
26
+    ) {}
27 27
 
28
-  public function __invoke(Request $request): JsonResponse
29
-  {
28
+    public function __invoke(Request $request): JsonResponse
29
+    {
30 30
     try {
31
-      $json = json_decode($request->getContent(), true);
32
-      $people = $this->manager->getRepository(People::class)->find($json['people']);
33
-      $module = $this->manager->getRepository(Module::class)->find($json['module']);
31
+        $json = json_decode($request->getContent(), true);
32
+        $people = $this->manager->getRepository(People::class)->find($json['people']);
33
+        $module = $this->manager->getRepository(Module::class)->find($json['module']);
34 34
 
35
-      $config = $this->configService->addConfig(
35
+        $config = $this->configService->addConfig(
36 36
         $people,
37 37
         $json['configKey'],
38 38
         $json['configValue'],
39 39
         $module,
40 40
         $json['visibility']
41
-      );
41
+        );
42 42
 
43
-      return new JsonResponse($this->hydratorService->item(Config::class, $config->getId(), "config:read"), Response::HTTP_OK);
43
+        return new JsonResponse($this->hydratorService->item(Config::class, $config->getId(), "config:read"), Response::HTTP_OK);
44 44
     } catch (Exception $e) {
45
-      return new JsonResponse($this->hydratorService->error($e));
45
+        return new JsonResponse($this->hydratorService->error($e));
46
+    }
46 47
     }
47
-  }
48 48
 }
Please login to merge, or discard this patch.