Passed
Push — master ( 10f39b...f31336 )
by Jan
03:26
created
src/Command/SetPasswordCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $user = $users[0];
51 51
 
52 52
 
53
-        if($user == null)
53
+        if ($user == null)
54 54
         {
55 55
             $io->error(sprintf('No user with the given username %s found in the database!', $user_name));
56 56
             return;
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             sprintf('You are going to change the password of %s with ID %d. Proceed?',
63 63
                 $user->getFullName(true), $user->getID()));
64 64
 
65
-        if(!$proceed)
65
+        if (!$proceed)
66 66
         {
67 67
             return;
68 68
         }
@@ -70,10 +70,10 @@  discard block
 block discarded – undo
70 70
         $success = false;
71 71
         $new_password = "";
72 72
 
73
-        while(!$success) {
73
+        while (!$success) {
74 74
             $pw1 = $io->askHidden("Please enter new password:");
75 75
             $pw2 = $io->askHidden('Please confirm:');
76
-            if($pw1 !== $pw2) {
76
+            if ($pw1 !== $pw2) {
77 77
                 $io->error('The entered password did not match! Please try again.');
78 78
             } else {
79 79
                 //Exit loop
Please login to merge, or discard this patch.
src/Entity/User.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 class User extends NamedDBElement implements UserInterface, HasPermissionsInterface
49 49
 {
50 50
     /** The User id of the anonymous user */
51
-    const ID_ANONYMOUS      = 1;
51
+    const ID_ANONYMOUS = 1;
52 52
 
53 53
     /**
54 54
      * @ORM\Id()
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      */
222 222
     public function getIDString(): string
223 223
     {
224
-        return 'U' . sprintf('%06d', $this->getID());
224
+        return 'U'.sprintf('%06d', $this->getID());
225 225
     }
226 226
 
227 227
 
@@ -242,9 +242,9 @@  discard block
 block discarded – undo
242 242
      */
243 243
     public function getFullName(bool $including_username = false)
244 244
     {
245
-        $str = $this->getFirstName() . ' ' . $this->getLastName();
245
+        $str = $this->getFirstName().' '.$this->getLastName();
246 246
         if ($including_username) {
247
-            $str .= ' (' . $this->getName() . ')';
247
+            $str .= ' ('.$this->getName().')';
248 248
         }
249 249
 
250 250
         return $str;
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
     public function setName(string $new_name) : NamedDBElement
255 255
     {
256 256
         // Anonymous user is not allowed to change its username
257
-        if(!$this->isAnonymousUser()) {
257
+        if (!$this->isAnonymousUser()) {
258 258
             $this->name = $new_name;
259 259
         }
260 260
 
Please login to merge, or discard this patch.