Passed
Push — master ( db2ea2...f95733 )
by Luiz Kim
02:09
created
src/Service/UserService.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@  discard block
 block discarded – undo
13 13
   public function __construct(private EntityManagerInterface $manager, private  UserPasswordEncoderInterface $encoder) {}
14 14
   public function changePassword(User $user, $password)
15 15
   {
16
-    if (!$this->getPermission())
17
-      throw new Exception("You should not pass!!!", 301);
16
+    if (!$this->getPermission()) {
17
+          throw new Exception("You should not pass!!!", 301);
18
+    }
18 19
 
19 20
     $user->setHash(
20 21
       $this->encoder->encodePassword($user, $password)
@@ -27,8 +28,9 @@  discard block
 block discarded – undo
27 28
 
28 29
   public function createUser(People $people, $username, $password)
29 30
   {
30
-    if (!$this->getPermission())
31
-      throw new Exception("You should not pass!!!", 301);
31
+    if (!$this->getPermission()) {
32
+          throw new Exception("You should not pass!!!", 301);
33
+    }
32 34
 
33 35
     $user = new User();
34 36
     $user->setPeople($people);
Please login to merge, or discard this patch.