GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Branch develop (439ea1)
by Steven
03:12
created
src/HtpasswdManager/Service/UserService.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,8 +36,9 @@  discard block
 block discarded – undo
36 36
 				$username 
37 37
 		) );
38 38
 		
39
-		if ($eResult->stopped ())
40
-			return $eResult->last ();
39
+		if ($eResult->stopped ()) {
40
+					return $eResult->last ();
41
+		}
41 42
 		
42 43
 		return ! in_array ( $username, $this->not_deletable_users );
43 44
 	}
@@ -47,8 +48,9 @@  discard block
 block discarded – undo
47 48
 				'user' => $username 
48 49
 		) );
49 50
 		
50
-		if ($eResult->stopped ())
51
-			return $eResult->last ();
51
+		if ($eResult->stopped ()) {
52
+					return $eResult->last ();
53
+		}
52 54
 			
53 55
 			/* If parameter is an array => allow only users in list. IF parameter is boolean, return boolean value */
54 56
 		if (is_array ( $this->user_with_management_permission )) {
Please login to merge, or discard this patch.
src/HtpasswdManager/Controller/UserController.php 2 patches
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -157,12 +157,13 @@
 block discarded – undo
157 157
      * @return boolean string
158 158
      */
159 159
     private function isUsernameValid($username) {
160
-        if (strlen($username) <= 2)
161
-            return "Benutzername ist zu kurz.";
162
-        else if (preg_match('~[a-zäöo][a-zäöu_0-9-]+~i', $username) !== 1)
163
-            return "Benutzername enthält ungültige Zeichen";
164
-        else if (strpos($username, ' ') !== false)
165
-            return "Leerzeichen sind im Benutzernamen nicht erlaubt";
160
+        if (strlen($username) <= 2) {
161
+                    return "Benutzername ist zu kurz.";
162
+        } else if (preg_match('~[a-zäöo][a-zäöu_0-9-]+~i', $username) !== 1) {
163
+                    return "Benutzername enthält ungültige Zeichen";
164
+        } else if (strpos($username, ' ') !== false) {
165
+                    return "Leerzeichen sind im Benutzernamen nicht erlaubt";
166
+        }
166 167
 
167 168
         return true;
168 169
     }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@
 block discarded – undo
154 154
      * Returns true if valid, of not it returns a string with information about the reason
155 155
      *
156 156
      * @param string $username
157
-     * @return boolean string
157
+     * @return string|boolean string
158 158
      */
159 159
     private function isUsernameValid($username) {
160 160
         if (strlen($username) <= 2)
Please login to merge, or discard this patch.
src/HtpasswdManager/Service/HtpasswdService.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,8 +115,9 @@
 block discarded – undo
115 115
     public function userExists($username) {
116 116
         $userList = $this->getUserList();
117 117
 
118
-        if (isset ($userList [$username]))
119
-            return true;
118
+        if (isset ($userList [$username])) {
119
+                    return true;
120
+        }
120 121
 
121 122
         return false;
122 123
     }
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -104,6 +104,9 @@
 block discarded – undo
104 104
         return $usernameDeleted;
105 105
     }
106 106
 
107
+    /**
108
+     * @param string $newContent
109
+     */
107 110
     private function replaceHtPasswdContent($newContent) {
108 111
         $fp = fopen($this->filename, 'w');
109 112
         fwrite($fp, $newContent);
Please login to merge, or discard this patch.