Passed
Push — master ( 5192e9...fad8e8 )
by Luiz Kim
02:02
created
src/Controller/ChangePasswordAction.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -12,38 +12,38 @@
 block discarded – undo
12 12
 class ChangePasswordAction
13 13
 {
14 14
 
15
-  public function __construct(
15
+    public function __construct(
16 16
     private EntityManagerInterface $manager,
17 17
     private UserService $service,
18 18
     private HydratorService $hydratorService
19 19
 
20
-  ) {}
20
+    ) {}
21 21
 
22
-  public function __invoke(User $data, Request $request)
23
-  {
22
+    public function __invoke(User $data, Request $request)
23
+    {
24 24
 
25 25
     try {
26
-      $payload   = json_decode($request->getContent());
26
+        $payload   = json_decode($request->getContent());
27 27
 
28
-      $user = $this->service->changePassword($data, $payload->password);
28
+        $user = $this->service->changePassword($data, $payload->password);
29 29
 
30
-      return new JsonResponse(
30
+        return new JsonResponse(
31 31
         $this->hydratorService->item(
32
-          User::class,
33
-          $user->getId(),
34
-          "user_read"
32
+            User::class,
33
+            $user->getId(),
34
+            "user_read"
35 35
         )
36
-      );
36
+        );
37 37
     } catch (\Exception $e) {
38 38
 
39
-      return new JsonResponse([
39
+        return new JsonResponse([
40 40
         'response' => [
41
-          'data'    => [],
42
-          'count'   => 0,
43
-          'error'   => $e->getMessage(),
44
-          'success' => false,
41
+            'data'    => [],
42
+            'count'   => 0,
43
+            'error'   => $e->getMessage(),
44
+            'success' => false,
45 45
         ],
46
-      ], 500);
46
+        ], 500);
47
+    }
47 48
     }
48
-  }
49 49
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
   {
24 24
 
25 25
     try {
26
-      $payload   = json_decode($request->getContent());
26
+      $payload = json_decode($request->getContent());
27 27
 
28 28
       $user = $this->service->changePassword($data, $payload->password);
29 29
 
Please login to merge, or discard this patch.
src/Controller/CreateUserAction.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -12,42 +12,42 @@
 block discarded – undo
12 12
 class CreateUserAction
13 13
 {
14 14
 
15
-  public function __construct(
15
+    public function __construct(
16 16
     private EntityManagerInterface $manager,
17 17
     private UserService $service,
18 18
     private HydratorService $hydratorService
19 19
 
20
-  ) {}
20
+    ) {}
21 21
 
22
-  public function __invoke(Request $request)
23
-  {
22
+    public function __invoke(Request $request)
23
+    {
24 24
 
25 25
     try {
26
-      $payload   = json_decode($request->getContent());
26
+        $payload   = json_decode($request->getContent());
27 27
 
28
-      $user = $this->service->createUser(
28
+        $user = $this->service->createUser(
29 29
         $payload->people,
30 30
         $payload->username,
31 31
         $payload->password
32
-      );
32
+        );
33 33
 
34
-      return new JsonResponse(
34
+        return new JsonResponse(
35 35
         $this->hydratorService->item(
36
-          User::class,
37
-          $user->getId(),
38
-          "user_read"
36
+            User::class,
37
+            $user->getId(),
38
+            "user_read"
39 39
         )
40
-      );
40
+        );
41 41
     } catch (\Exception $e) {
42 42
 
43
-      return new JsonResponse([
43
+        return new JsonResponse([
44 44
         'response' => [
45
-          'data'    => [],
46
-          'count'   => 0,
47
-          'error'   => $e->getMessage(),
48
-          'success' => false,
45
+            'data'    => [],
46
+            'count'   => 0,
47
+            'error'   => $e->getMessage(),
48
+            'success' => false,
49 49
         ],
50
-      ], 500);
50
+        ], 500);
51
+    }
51 52
     }
52
-  }
53 53
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
   {
24 24
 
25 25
     try {
26
-      $payload   = json_decode($request->getContent());
26
+      $payload = json_decode($request->getContent());
27 27
 
28 28
       $user = $this->service->createUser(
29 29
         $payload->people,
Please login to merge, or discard this patch.