Passed
Pull Request — master (#198)
by
unknown
02:40
created
src/plugins/onTick/evemails.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
         $cacheClr = $baseUnix - 13500;
113 113
 
114 114
         //Set timer for next key based on number of keys
115
-        $nextKey = (1900 / (int)$this->numberOfKeys) + time();
115
+        $nextKey = (1900 / (int) $this->numberOfKeys) + time();
116 116
         $nextKeyTime = gmdate('Y-m-d H:i:s', $nextKey);
117 117
         setPermCache('mailLastChecked', $nextKey);
118 118
 
Please login to merge, or discard this patch.
src/plugins/onTick/notifications.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
                 $this->fuelChannel = $this->toDiscordChannel;
126 126
             }
127 127
             //Set timer for next key based on number of keys
128
-            $nextKey = (1900 / (int)$this->numberOfKeys) + time();
128
+            $nextKey = (1900 / (int) $this->numberOfKeys) + time();
129 129
             $nextKeyTime = gmdate('Y-m-d H:i:s', $nextKey);
130 130
             setPermCache('notificationsLastChecked', $nextKey);
131 131
             //Set cache timer for api key
Please login to merge, or discard this patch.
src/plugins/admin/setAvatar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
             $roles = $member->roles;
72 72
             foreach ($roles as $role) {
73 73
                 if (in_array(strtolower($role->name), $adminRoles, true)) {
74
-                    $avatarURL = strtolower((string)$data['messageString']);
74
+                    $avatarURL = strtolower((string) $data['messageString']);
75 75
                     $ch = curl_init($avatarURL);
76 76
                     if (substr($avatarURL, -4) === '.jpg') {
77 77
                         $fp = fopen('/tmp/avatar.jpg', 'wb');
Please login to merge, or discard this patch.
Dramiel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 GLOBAL $logger;
56 56
 
57 57
 //Check we are not running on a 32bit platform
58
-if(PHP_INT_SIZE == 4)
58
+if (PHP_INT_SIZE == 4)
59 59
 {
60 60
 	$logger->error('32bit PHP found, if you are running a 64bit OS please install 64bit PHP');
61 61
 	die();
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
                         clearQueuedMessages($id);
207 207
                         continue;
208 208
                     }
209
-                    $channel = $guild->channels->get('id', (int)$queuedMessage['channel']);
209
+                    $channel = $guild->channels->get('id', (int) $queuedMessage['channel']);
210 210
                     //Check if channel is bad
211 211
                     if (null === $channel) {
212 212
                         $logger->addInfo("QueueProcessing Error- Item #{$id} : Channel provided is incorrect, removing it from the queue");
Please login to merge, or discard this patch.
src/plugins/onTick/getKillmails.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -93,16 +93,16 @@  discard block
 block discarded – undo
93 93
             if ($kmGroup['startMail'] > $killID || null === $killID) {
94 94
                 $killID = $kmGroup['startMail'];
95 95
             }
96
-            if ((string)$kmGroup['allianceID'] === '0' & $kmGroup['lossMails'] === 'true') {
96
+            if ((string) $kmGroup['allianceID'] === '0' & $kmGroup['lossMails'] === 'true') {
97 97
                 $url = "https://zkillboard.com/api/corporationID/{$kmGroup['corpID']}/no-attackers/no-items/orderDirection/asc/afterKillID/{$killID}/";
98 98
             }
99
-            if ((string)$kmGroup['allianceID'] === '0' & $kmGroup['lossMails'] === 'false') {
99
+            if ((string) $kmGroup['allianceID'] === '0' & $kmGroup['lossMails'] === 'false') {
100 100
                 $url = "https://zkillboard.com/api/corporationID/{$kmGroup['corpID']}/no-attackers/no-items/kills/orderDirection/asc/afterKillID/{$killID}/";
101 101
             }
102
-            if ((string)$kmGroup['allianceID'] !== '0' & $kmGroup['lossMails'] === 'true') {
102
+            if ((string) $kmGroup['allianceID'] !== '0' & $kmGroup['lossMails'] === 'true') {
103 103
                 $url = "https://zkillboard.com/api/allianceID/{$kmGroup['allianceID']}/no-attackers/no-items/orderDirection/asc/afterKillID/{$killID}/";
104 104
             }
105
-            if ((string)$kmGroup['allianceID'] !== '0' & $kmGroup['lossMails'] === 'false') {
105
+            if ((string) $kmGroup['allianceID'] !== '0' & $kmGroup['lossMails'] === 'false') {
106 106
                 $url = "https://zkillboard.com/api/allianceID/{$kmGroup['allianceID']}/no-attackers/no-items/kills/orderDirection/asc/afterKillID/{$killID}/";
107 107
             }
108 108
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                 if ($i < 10) {
198 198
                     $killID = $kill['killID'];
199 199
                     //check if mail is old
200
-                    if ((int)$killID <= (int)$oldID) {
200
+                    if ((int) $killID <= (int) $oldID) {
201 201
                         continue;
202 202
                     }
203 203
                     //save highest killID for cache
Please login to merge, or discard this patch.
src/plugins/onTick/authCheck.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             $charID = $rows[$discordID]['characterID'];
192 192
 
193 193
             // corporation membership check
194
-            for ($i=0; $i<3; $i++) {
194
+            for ($i = 0; $i < 3; $i++) {
195 195
                 $character = characterDetails($charID);
196 196
                 //if (isset($character['corporation_id']) && in_array($character['corporation_id'], $corpArray))
197 197
                 if (!is_null($character))
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
             }
213 213
 
214 214
             // alliance membership check
215
-            for ($i=0; $i<3; $i++) {
215
+            for ($i = 0; $i < 3; $i++) {
216 216
                 $corporationDetails = corpDetails($corporationID);
217 217
                 if (!is_null($corporationDetails))
218 218
                     break;
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
                         if ($timeout > 9) {
311 311
                             continue;
312 312
                         }
313
-                        else{
313
+                        else {
314 314
                             $character = characterDetails($charID);
315 315
                             $timeout++;
316 316
                         }
Please login to merge, or discard this 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.