Passed
Branch dev (4a19ba)
by
unknown
02:39
created
src/plugins/onTick/authCheck.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -165,10 +165,10 @@  discard block
 block discarded – undo
165 165
         //Set corp/ally id arrays
166 166
         foreach ($this->authGroups as $authGroup) {
167 167
             if ($authGroup['corpID'] !== 0) {
168
-                $corpArray[] = (int)$authGroup['corpID'];
168
+                $corpArray[] = (int) $authGroup['corpID'];
169 169
             }
170 170
             if ($authGroup['allianceID'] !== 0) {
171
-                $allianceArray[] = (int)$authGroup['allianceID'];
171
+                $allianceArray[] = (int) $authGroup['allianceID'];
172 172
             }
173 173
         }
174 174
 
@@ -208,11 +208,11 @@  discard block
 block discarded – undo
208 208
                     if ($role === 'red' && ($allianceContacts['standings'] || $corpContacts['standings'] === -5 || -10)) {
209 209
                         $standings = 1;
210 210
                     }
211
-                    if ($role === 'neut' && ($allianceContacts['standings'] || $corpContacts['standings'] === 0 || (@(int)$allianceContacts['standings'] && @(int)$corpContacts['standings'] === null || ''))) {
211
+                    if ($role === 'neut' && ($allianceContacts['standings'] || $corpContacts['standings'] === 0 || (@(int) $allianceContacts['standings'] && @(int) $corpContacts['standings'] === null || ''))) {
212 212
                         $standings = 1;
213 213
                     }
214 214
                 }
215
-                if (!in_array((int)$allianceID, $allianceArray) && !in_array((int)$corporationID, $corpArray) && null === $standings) {
215
+                if (!in_array((int) $allianceID, $allianceArray) && !in_array((int) $corporationID, $corpArray) && null === $standings) {
216 216
                     // Deactivate user in database
217 217
                     $sql = "UPDATE authUsers SET active='no' WHERE discordID='$discordID'";
218 218
                     $this->logger->addInfo("AuthCheck: {$eveName} account has been deactivated as they are no longer in a correct corp/alliance.");
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
         $guild = $this->discord->guilds->get('id', $this->guildID);
319 319
 
320 320
         //Get name queue status
321
-        $x = (int)getPermCache('nameQueueState');
321
+        $x = (int) getPermCache('nameQueueState');
322 322
 
323 323
         //Establish connection to mysql
324 324
         $conn = new mysqli($this->db, $this->dbUser, $this->dbPass, $this->dbName);
@@ -384,10 +384,10 @@  discard block
 block discarded – undo
384 384
                     }
385 385
                     $nick = null;
386 386
                     if (null !== @$corpInfo['corpTicker']) {
387
-                        $corpTicker = (string)$corpInfo['corpTicker'];
387
+                        $corpTicker = (string) $corpInfo['corpTicker'];
388 388
                         if ($this->nameEnforce === 'true') {
389 389
                             $nick = "[{$corpTicker}] {$eveName}";
390
-                        } elseif ((string)$nickName === "[{$corpTicker}]") {
390
+                        } elseif ((string) $nickName === "[{$corpTicker}]") {
391 391
                             $nick = "[{$corpTicker}] {$userName}";
392 392
                         } elseif (strpos($nickName, $corpTicker) === false) {
393 393
                             $nick = "[{$corpTicker}] {$nickName}";
@@ -408,11 +408,11 @@  discard block
 block discarded – undo
408 408
                     if (@$corpTicker === 'U') {
409 409
                         continue;
410 410
                     }
411
-                    $corpName = (string)$corporationDetails['corporation_name'];
411
+                    $corpName = (string) $corporationDetails['corporation_name'];
412 412
                     if (null !== $corpTicker) {
413 413
                         if ($this->nameEnforce === 'true') {
414 414
                             $nick = "[{$corpTicker}] {$eveName}";
415
-                        } elseif ((string)$nickName === "[{$corpTicker}]") {
415
+                        } elseif ((string) $nickName === "[{$corpTicker}]") {
416 416
                             $nick = "[{$corpTicker}] {$userName}";
417 417
                         } elseif (strpos($nickName, $corpTicker) === false) {
418 418
                             $nick = "[{$corpTicker}] {$nickName}";
@@ -446,14 +446,14 @@  discard block
 block discarded – undo
446 446
     private function standingsUpdate()
447 447
     {
448 448
         foreach ($this->apiKey as $apiKey) {
449
-            if ((string)$apiKey['keyID'] === (string)$this->config['plugins']['auth']['standings']['apiKey']) {
449
+            if ((string) $apiKey['keyID'] === (string) $this->config['plugins']['auth']['standings']['apiKey']) {
450 450
                 $url = "https://api.eveonline.com/char/ContactList.xml.aspx?keyID={$apiKey['keyID']}&vCode={$apiKey['vCode']}&characterID={$apiKey['characterID']}";
451 451
                 $xml = makeApiRequest($url);
452 452
                 if (empty($xml)) {
453 453
                     return null;
454 454
                 }
455 455
                 foreach ($xml->result->rowset as $contactType) {
456
-                    if ((string)$contactType->attributes()->name === 'corporateContactList' || 'allianceContactList') {
456
+                    if ((string) $contactType->attributes()->name === 'corporateContactList' || 'allianceContactList') {
457 457
                         foreach ($contactType->row as $contact) {
458 458
                             if (null !== $contact['contactID'] && $contact['contactName'] && $contact['standing']) {
459 459
                                 addContactInfo($contact['contactID'], $contact['contactName'], $contact['standing']);
Please login to merge, or discard this patch.