Passed
Pull Request — master (#105)
by Bob
15:23 queued 05:06
created
src/plugins/onTick/notifications.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
                 $this->fuelChannel = $this->toDiscordChannel;
173 173
             }
174 174
             //Set timer for next key based on number of keys
175
-            $nextKey = (1900 / (int)$this->numberOfKeys) + time();
175
+            $nextKey = (1900 / (int) $this->numberOfKeys) + time();
176 176
             $nextKeyTime = gmdate("Y-m-d H:i:s", $nextKey);
177 177
             setPermCache("notificationsLastChecked", $nextKey);
178 178
             //Set cache timer for api key
Please login to merge, or discard this patch.
src/plugins/onTick/evemails.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
         $cacheClr = $baseUnix - 13500;
147 147
 
148 148
         //Set timer for next key based on number of keys
149
-        $nextKey = (1900 / (int)$this->numberOfKeys) + time();
149
+        $nextKey = (1900 / (int) $this->numberOfKeys) + time();
150 150
         $nextKeyTime = gmdate("Y-m-d H:i:s", $nextKey);
151 151
         setPermCache("mailLastChecked", $nextKey);
152 152
 
Please login to merge, or discard this patch.
Dramiel.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -158,21 +158,21 @@  discard block
 block discarded – undo
158 158
         $discord->updatePresence($game);
159 159
 
160 160
         // Server Status Check (tick plugins will not run if eve is offline)
161
-        $discord->loop->addPeriodicTimer(60, function () use ($logger) {
161
+        $discord->loop->addPeriodicTimer(60, function() use ($logger) {
162 162
             $crestData = json_decode(downloadData('https://crest-tq.eveonline.com/'), true);
163 163
             $crestStatus = isset($crestData['serviceStatus']) ? $crestData['serviceStatus'] : 'offline';
164 164
             setPermCache('serverState', $crestStatus);
165 165
         });
166 166
 
167 167
         // Run the Tick plugins
168
-        $discord->loop->addPeriodicTimer(3, function () use ($pluginsT) {
168
+        $discord->loop->addPeriodicTimer(3, function() use ($pluginsT) {
169 169
             foreach ($pluginsT as $plugin) {
170 170
                 $plugin->tick();
171 171
             }
172 172
         });
173 173
 
174 174
         // Message queue
175
-        $discord->loop->addPeriodicTimer(7, function () use ($discord, $logger) {
175
+        $discord->loop->addPeriodicTimer(7, function() use ($discord, $logger) {
176 176
             $x = 0;
177 177
             while ($x < 3) {
178 178
                 $id = getOldestMessage();
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         });
229 229
 
230 230
         // Mem cleanup every 30 minutes
231
-        $discord->loop->addPeriodicTimer(1800, function () use ($logger) {
231
+        $discord->loop->addPeriodicTimer(1800, function() use ($logger) {
232 232
             $logger->addInfo('Memory in use: ' . memory_get_usage() / 1024 / 1024 . 'MB');
233 233
             gc_collect_cycles(); // Collect garbage
234 234
             $logger->addInfo('Memory in use after garbage collection: ' . memory_get_usage() / 1024 / 1024 . 'MB');
Please login to merge, or discard this patch.
src/plugins/onTick/authCheck.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -154,10 +154,10 @@  discard block
 block discarded – undo
154 154
         //Set corp/ally id arrays
155 155
         foreach ($this->authGroups as $authGroup) {
156 156
             if ($authGroup['corpID'] !== 0) {
157
-                $corpArray[] = (int)$authGroup['corpID'];
157
+                $corpArray[] = (int) $authGroup['corpID'];
158 158
             }
159 159
             if ($authGroup['allianceID'] !== 0) {
160
-                $allianceArray[] = (int)$authGroup['allianceID'];
160
+                $allianceArray[] = (int) $authGroup['allianceID'];
161 161
             }
162 162
         }
163 163
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
                 //Auth things
185 185
                 if ($xml->result->rowset->row[0]) {
186 186
                     foreach ($xml->result->rowset->row as $character) {
187
-                        if (!in_array((int)$character->attributes()->allianceID, $allianceArray) && !in_array((int)$character->attributes()->corporationID, $corpArray)) {
187
+                        if (!in_array((int) $character->attributes()->allianceID, $allianceArray) && !in_array((int) $character->attributes()->corporationID, $corpArray)) {
188 188
                             // Deactivate user in database
189 189
                             $sql = "UPDATE authUsers SET active='no' WHERE discordID='$discordID'";
190 190
                             $this->logger->addInfo("AuthCheck: {$eveName} account has been deactivated as they are no longer in a correct corp/alliance.");
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
         $guild = $this->discord->guilds->get('id', $this->guildID);
291 291
 
292 292
         //Get name queue status
293
-        $x = (int)getPermCache('nameQueueState');
293
+        $x = (int) getPermCache('nameQueueState');
294 294
 
295 295
         //Establish connection to mysql
296 296
         $conn = new mysqli($this->db, $this->dbUser, $this->dbPass, $this->dbName);
@@ -349,10 +349,10 @@  discard block
 block discarded – undo
349 349
                         foreach ($xml->result->rowset->row as $character) {
350 350
                             $corpInfo = getCorpInfo($character->attributes()->corporationID);
351 351
                             if (null !== $corpInfo) {
352
-                                $corpTicker = (string)$corpInfo['corpTicker'];
352
+                                $corpTicker = (string) $corpInfo['corpTicker'];
353 353
                                 if ($this->nameEnforce === 'true') {
354 354
                                     $nick = "[{$corpTicker}] {$eveName}";
355
-                                } elseif ((string)$nickName === "[{$corpTicker}]") {
355
+                                } elseif ((string) $nickName === "[{$corpTicker}]") {
356 356
                                     $nick = "[{$corpTicker}] {$userName}";
357 357
                                 } elseif (strpos($nickName, $corpTicker) == false) {
358 358
                                     $nick = "[{$corpTicker}] {$nickName}";
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
                             }
376 376
                             if ($this->nameEnforce === 'true') {
377 377
                                 $nick = "[{$corpTicker}] {$eveName}";
378
-                            } elseif ((string)$nickName === "[{$corpTicker}]") {
378
+                            } elseif ((string) $nickName === "[{$corpTicker}]") {
379 379
                                 $nick = "[{$corpTicker}] {$userName}";
380 380
                             } elseif (strpos($nickName, $corpTicker) == false) {
381 381
                                 $nick = "[{$corpTicker}] {$nickName}";
Please login to merge, or discard this patch.