Passed
Push — master ( df02ac...d309df )
by Petr
02:23
created
php-src/Sources/File.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
             static::PW_ID => $uid,
130 130
             static::PW_NAME => $userName,
131 131
             static::PW_PASS => $this->mode->hash($password),
132
-            static::PW_GROUP => empty($user->getGroup()) ? $uid : $user->getClass() ,
133
-            static::PW_CLASS => empty($user->getClass()) ? IAccessClasses::CLASS_USER : $user->getClass() ,
132
+            static::PW_GROUP => empty($user->getGroup()) ? $uid : $user->getClass(),
133
+            static::PW_CLASS => empty($user->getClass()) ? IAccessClasses::CLASS_USER : $user->getClass(),
134 134
             static::PW_DISPLAY => empty($displayName) ? $userName : $displayName,
135 135
             static::PW_DIR => $directory,
136 136
             static::PW_FEED => '',
@@ -175,10 +175,10 @@  discard block
 block discarded – undo
175 175
         foreach ($passwordLines as &$line) {
176 176
             if ($line[static::PW_NAME] == $userName) {
177 177
                 // REFILL
178
-                $line[static::PW_GROUP] = !empty($user->getGroup()) ? $user->getGroup() : $line[static::PW_GROUP] ;
179
-                $line[static::PW_CLASS] = !empty($user->getClass()) ? $user->getClass() : $line[static::PW_CLASS] ;
180
-                $line[static::PW_DISPLAY] = !empty($displayName) ? $displayName : $line[static::PW_DISPLAY] ;
181
-                $line[static::PW_DIR] = !empty($directory) ? $directory : $line[static::PW_DIR] ;
178
+                $line[static::PW_GROUP] = !empty($user->getGroup()) ? $user->getGroup() : $line[static::PW_GROUP];
179
+                $line[static::PW_CLASS] = !empty($user->getClass()) ? $user->getClass() : $line[static::PW_CLASS];
180
+                $line[static::PW_DISPLAY] = !empty($displayName) ? $displayName : $line[static::PW_DISPLAY];
181
+                $line[static::PW_DIR] = !empty($directory) ? $directory : $line[static::PW_DIR];
182 182
             }
183 183
         }
184 184
 
Please login to merge, or discard this patch.
php-src/Sources/Files.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -212,8 +212,8 @@  discard block
 block discarded – undo
212 212
         $newUserPass = [
213 213
             static::PW_NAME => $userName,
214 214
             static::PW_ID => $uid,
215
-            static::PW_GROUP => empty($user->getGroup()) ? $uid : $user->getGroup() ,
216
-            static::PW_CLASS => empty($user->getClass()) ? IAccessClasses::CLASS_USER : $user->getClass() ,
215
+            static::PW_GROUP => empty($user->getGroup()) ? $uid : $user->getGroup(),
216
+            static::PW_CLASS => empty($user->getClass()) ? IAccessClasses::CLASS_USER : $user->getClass(),
217 217
             static::PW_DISPLAY => empty($displayName) ? $userName : $displayName,
218 218
             static::PW_DIR => $directory,
219 219
             static::PW_FEED => '',
@@ -292,10 +292,10 @@  discard block
 block discarded – undo
292 292
                     $oldName = $line[static::PW_NAME];
293 293
                     $line[static::PW_NAME] = $userName;
294 294
                 }
295
-                $line[static::PW_GROUP] = !empty($user->getGroup()) ? $user->getGroup() : $line[static::PW_GROUP] ;
296
-                $line[static::PW_CLASS] = !empty($user->getClass()) ? $user->getClass() : $line[static::PW_CLASS] ;
297
-                $line[static::PW_DISPLAY] = !empty($displayName) ? $displayName : $line[static::PW_DISPLAY] ;
298
-                $line[static::PW_DIR] = !empty($directory) ? $directory : $line[static::PW_DIR] ;
295
+                $line[static::PW_GROUP] = !empty($user->getGroup()) ? $user->getGroup() : $line[static::PW_GROUP];
296
+                $line[static::PW_CLASS] = !empty($user->getClass()) ? $user->getClass() : $line[static::PW_CLASS];
297
+                $line[static::PW_DISPLAY] = !empty($displayName) ? $displayName : $line[static::PW_DISPLAY];
298
+                $line[static::PW_DIR] = !empty($directory) ? $directory : $line[static::PW_DIR];
299 299
             }
300 300
         }
301 301
 
Please login to merge, or discard this patch.
php-src/Mode/KwOrig.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,14 +51,14 @@
 block discarded – undo
51 51
     {
52 52
         $ln = strlen($input);
53 53
         # pass is too long and salt too short
54
-        $salt = (strlen($this->salt) < ($ln*5))
54
+        $salt = (strlen($this->salt) < ($ln * 5))
55 55
             ? str_repeat($this->salt, 5)
56
-            : $this->salt ;
56
+            : $this->salt;
57 57
         return substr($salt, $ln, $ln)
58
-            . substr($input,0, (int) ($ln/2))
59
-            . substr($salt,$ln*2, $ln)
60
-            . substr($input, (int) ($ln/2))
61
-            . substr($salt,$ln*3, $ln);
58
+            . substr($input, 0, (int) ($ln / 2))
59
+            . substr($salt, $ln * 2, $ln)
60
+            . substr($input, (int) ($ln / 2))
61
+            . substr($salt, $ln * 3, $ln);
62 62
     }
63 63
 
64 64
     /**
Please login to merge, or discard this patch.
php-src/Methods/HttpUser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@
 block discarded – undo
36 36
 
37 37
     public function process(ArrayAccess $credentials): void
38 38
     {
39
-        $name = $this->server->offsetExists(static::INPUT_NAME) ? strval($this->server->offsetGet(static::INPUT_NAME)) : '' ;
40
-        $pass = $this->server->offsetExists(static::INPUT_PASS) ? strval($this->server->offsetGet(static::INPUT_PASS)) : '' ;
39
+        $name = $this->server->offsetExists(static::INPUT_NAME) ? strval($this->server->offsetGet(static::INPUT_NAME)) : '';
40
+        $pass = $this->server->offsetExists(static::INPUT_PASS) ? strval($this->server->offsetGet(static::INPUT_PASS)) : '';
41 41
 
42 42
         if (!empty($name) && !empty($pass)) {
43 43
             /** @scrutinizer ignore-call */
Please login to merge, or discard this patch.
php-src/Methods/Sessions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,10 +58,10 @@
 block discarded – undo
58 58
             /** @scrutinizer ignore-call */
59 59
             $this->loggedUser = $this->authenticator->getDataOnly($this->nameFromSess());
60 60
         } else {
61
-            $name = $credentials->offsetExists(static::INPUT_NAME) ? strval($credentials->offsetGet(static::INPUT_NAME)) : '' ;
62
-            $name = $credentials->offsetExists(static::INPUT_NAME2) ? strval($credentials->offsetGet(static::INPUT_NAME2)) : $name ;
63
-            $pass = $credentials->offsetExists(static::INPUT_PASS) ? strval($credentials->offsetGet(static::INPUT_PASS)) : '' ;
64
-            $pass = $credentials->offsetExists(static::INPUT_PASS2) ? strval($credentials->offsetGet(static::INPUT_PASS2)) : $pass ;
61
+            $name = $credentials->offsetExists(static::INPUT_NAME) ? strval($credentials->offsetGet(static::INPUT_NAME)) : '';
62
+            $name = $credentials->offsetExists(static::INPUT_NAME2) ? strval($credentials->offsetGet(static::INPUT_NAME2)) : $name;
63
+            $pass = $credentials->offsetExists(static::INPUT_PASS) ? strval($credentials->offsetGet(static::INPUT_PASS)) : '';
64
+            $pass = $credentials->offsetExists(static::INPUT_PASS2) ? strval($credentials->offsetGet(static::INPUT_PASS2)) : $pass;
65 65
             if (!empty($name) && !empty($pass)) {
66 66
                 /** @scrutinizer ignore-call */
67 67
                 $this->loggedUser = $this->authenticator->authenticate($name, ['password' => $pass]);
Please login to merge, or discard this patch.