Passed
Pull Request — master (#198)
by
unknown
02:40
created
src/plugins/onTick/authCheck.php 1 patch
Braces   +14 added lines, -10 removed lines patch added patch discarded remove patch
@@ -140,8 +140,9 @@  discard block
 block discarded – undo
140 140
         $dbh = new PDO("mysql:host={$this->db};dbname={$this->dbName}", $this->dbUser, $this->dbPass);
141 141
         $rows = array_column($dbh->query('SELECT discordID, characterID, eveName, role FROM authUsers')->fetchAll(), null, 'discordID');
142 142
         $roleRemoved = false;
143
-        if (null === $member->roles)
144
-            continue;
143
+        if (null === $member->roles) {
144
+                    continue;
145
+        }
145 146
         if (!isset($rows[$member->id])) {
146 147
             foreach ($member->roles as $role) {
147 148
                 if (!in_array($role->name, $this->exempt, true)) {
@@ -194,8 +195,9 @@  discard block
 block discarded – undo
194 195
             for ($i=0; $i<3; $i++) {
195 196
                 $character = characterDetails($charID);
196 197
                 //if (isset($character['corporation_id']) && in_array($character['corporation_id'], $corpArray))
197
-                if (!is_null($character))
198
-                    break;
198
+                if (!is_null($character)) {
199
+                                    break;
200
+                }
199 201
                 //Postpone check if ESI is down to prevent timeouts
200 202
                 if (isset($character['error']) && $character['error'] === 'The datasource tranquility is temporarily unavailable') {
201 203
                     $this->logger->addInfo('AuthCheck: The datasource tranquility is temporarily unavailable, check canceled.');
@@ -214,8 +216,9 @@  discard block
 block discarded – undo
214 216
             // alliance membership check
215 217
             for ($i=0; $i<3; $i++) {
216 218
                 $corporationDetails = corpDetails($corporationID);
217
-                if (!is_null($corporationDetails))
218
-                    break;
219
+                if (!is_null($corporationDetails)) {
220
+                                    break;
221
+                }
219 222
             }
220 223
             if (is_null($corporationDetails) || isset($corporationDetails['error'])) {
221 224
                 $this->logger->addInfo('AuthCheck: corpDetails lookup failed.');
@@ -240,8 +243,10 @@  discard block
 block discarded – undo
240 243
                     $standings = 1;
241 244
                 }
242 245
             }
243
-            if ($standings)
244
-                continue; //keep the user based on standings
246
+            if ($standings) {
247
+                            continue;
248
+            }
249
+            //keep the user based on standings
245 250
 
246 251
             // User failed all checks, deactivate user in database
247 252
             $sql = "UPDATE authUsers SET active='no' WHERE discordID='$discordID'";
@@ -309,8 +314,7 @@  discard block
 block discarded – undo
309 314
                     while (null === $character) { //try 10 times to pull characterDetails
310 315
                         if ($timeout > 9) {
311 316
                             continue;
312
-                        }
313
-                        else{
317
+                        } else{
314 318
                             $character = characterDetails($charID);
315 319
                             $timeout++;
316 320
                         }
Please login to merge, or discard this patch.