Passed
Push — master ( 06f317...3f8050 )
by Luiz Kim
09:56 queued 01:59
created
src/Controller/CreateUserAction.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      *
27 27
      * @var Request
28 28
      */
29
-    private $request  = null;
29
+    private $request = null;
30 30
 
31 31
     /**
32 32
      * Security
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,8 +119,9 @@
 block discarded – undo
119 119
                 'id' => $user->getId()
120 120
             ];
121 121
         } catch (\Exception $e) {
122
-            if ($this->manager->getConnection()->isTransactionActive())
123
-                $this->manager->getConnection()->rollBack();
122
+            if ($this->manager->getConnection()->isTransactionActive()) {
123
+                            $this->manager->getConnection()->rollBack();
124
+            }
124 125
 
125 126
             throw new \InvalidArgumentException($e->getMessage());
126 127
         }
Please login to merge, or discard this patch.
src/Controller/DeleteUserAction.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      *
27 27
      * @var Request
28 28
      */
29
-    private $request  = null;
29
+    private $request = null;
30 30
 
31 31
     /**
32 32
      * Security
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
                 throw new \InvalidArgumentException('Document id is not defined');
97 97
             }
98 98
 
99
-            $users   = $this->manager->getRepository(User::class)->findBy(['people' => $person]);
99
+            $users = $this->manager->getRepository(User::class)->findBy(['people' => $person]);
100 100
             if (count($users) == 1) {
101 101
                 throw new \InvalidArgumentException('Deve existir pelo menos um usuário');
102 102
             }
103 103
 
104
-            $user    = $this->manager->getRepository(User::class)->findOneBy(['id' => $payload['id'], 'people' => $person]);
104
+            $user = $this->manager->getRepository(User::class)->findOneBy(['id' => $payload['id'], 'people' => $person]);
105 105
             if (!$user instanceof User) {
106 106
                 throw new \InvalidArgumentException('Person user was not found');
107 107
             }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,8 +113,9 @@
 block discarded – undo
113 113
 
114 114
             return true;
115 115
         } catch (\Exception $e) {
116
-            if ($this->manager->getConnection()->isTransactionActive())
117
-                $this->manager->getConnection()->rollBack();
116
+            if ($this->manager->getConnection()->isTransactionActive()) {
117
+                            $this->manager->getConnection()->rollBack();
118
+            }
118 119
 
119 120
             throw new \InvalidArgumentException($e->getMessage());
120 121
         }
Please login to merge, or discard this patch.