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