Passed
Branch master (763a28)
by
unknown
03:03
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/rssReader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
             }
92 92
 
93 93
             $rss = new SimpleXMLElement($rssUrl, null, true); // XML parser
94
-			if ($rss===null || !is_object($rss)) {
94
+			if ($rss === null || !is_object($rss)) {
95 95
 				$this->logger->addInfo("Failed to load xml file: {$rssUrl}");
96 96
 				break;
97 97
 			}
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'] > $SavedKillID || null === $SavedKillID) {
94 94
                 $SavedKillID = $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/pastSeconds/10800/";
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/pastSeconds/10800/";
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/pastSeconds/10800/";
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/pastSeconds/10800/";
107 107
             }
108 108
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
  //               if ($i < 10) {
205 205
                     $killID = $kill['killID'];
206 206
                     //check if mail is old
207
-                    if ((int)$killID <= (int)$oldID) {
207
+                    if ((int) $killID <= (int) $oldID) {
208 208
                         continue;
209 209
                     }
210 210
                     //save highest killID for cache
Please login to merge, or discard this patch.
src/plugins/onTick/authCheck.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -245,13 +245,13 @@  discard block
 block discarded – undo
245 245
                 $corporationDetails = $this->getCorpDetails($character['corporation_id']);
246 246
                 $allianceContacts = getContacts($corporationDetails['alliance_id']);
247 247
                 $corpContacts = getContacts($character['corporation_id']);
248
-                if ($role === 'blue' && ((int)$allianceContacts['standing'] === 5 || 10 || (int)$corpContacts['standing'] === 5 || 10)) {
248
+                if ($role === 'blue' && ((int) $allianceContacts['standing'] === 5 || 10 || (int) $corpContacts['standing'] === 5 || 10)) {
249 249
                     $return = true;
250 250
                 }
251
-                if ($role === 'red' && ((int)$allianceContacts['standing'] === -5 || -10 || (int)$corpContacts['standing'] === -5 || -10)) {
251
+                if ($role === 'red' && ((int) $allianceContacts['standing'] === -5 || -10 || (int) $corpContacts['standing'] === -5 || -10)) {
252 252
                     $return = true;
253 253
                 }
254
-                if ($role === 'neut' && ((int)$allianceContacts['standing'] === 0 || (int)$corpContacts['standing'] === 0 || (@(int)$allianceContacts['standings'] === null || '' && @(int)$corpContacts['standings'] === null || ''))) {
254
+                if ($role === 'neut' && ((int) $allianceContacts['standing'] === 0 || (int) $corpContacts['standing'] === 0 || (@(int) $allianceContacts['standings'] === null || '' && @(int) $corpContacts['standings'] === null || ''))) {
255 255
                     $return = true;
256 256
                 }
257 257
             }
@@ -329,14 +329,14 @@  discard block
 block discarded – undo
329 329
     private function standingsUpdate()
330 330
     {
331 331
         foreach ($this->apiKey as $apiKey) {
332
-            if ((string)$apiKey['keyID'] === (string)$this->config['plugins']['auth']['standings']['apiKey']) {
332
+            if ((string) $apiKey['keyID'] === (string) $this->config['plugins']['auth']['standings']['apiKey']) {
333 333
                 $url = "https://api.eveonline.com/char/ContactList.xml.aspx?keyID={$apiKey['keyID']}&vCode={$apiKey['vCode']}&characterID={$apiKey['characterID']}";
334 334
                 $xml = makeApiRequest($url);
335 335
                 if (empty($xml)) {
336 336
                     return null;
337 337
                 }
338 338
                 foreach ($xml->result->rowset as $contactType) {
339
-                    if ((string)$contactType->attributes()->name === 'corporateContactList' || 'allianceContactList') {
339
+                    if ((string) $contactType->attributes()->name === 'corporateContactList' || 'allianceContactList') {
340 340
                         foreach ($contactType->row as $contact) {
341 341
                             if (null !== $contact['contactID'] && $contact['contactName'] && $contact['standing']) {
342 342
                                 addContactInfo($contact['contactID'], $contact['contactName'], $contact['standing']);
Please login to merge, or discard this patch.
src/plugins/onMessage/price.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -132,12 +132,12 @@
 block discarded – undo
132 132
                     $data = new SimpleXMLElement(downloadData("https://api.eve-central.com/api/marketstat?usesystem={$solarSystemID}&typeid={$typeID}"));
133 133
                 }
134 134
 
135
-                $lowBuy = str_pad(number_format((float) $data->marketstat->type->buy->min, 2),18," ",STR_PAD_LEFT);
136
-                $avgBuy = str_pad(number_format((float) $data->marketstat->type->buy->avg, 2),18," ",STR_PAD_LEFT);
137
-                $highBuy = str_pad(number_format((float) $data->marketstat->type->buy->max, 2),18," ",STR_PAD_LEFT);
138
-                $lowSell = str_pad(number_format((float) $data->marketstat->type->sell->min, 2),18," ",STR_PAD_LEFT);
139
-                $avgSell = str_pad(number_format((float) $data->marketstat->type->sell->avg, 2),18," ",STR_PAD_LEFT);
140
-                $highSell = str_pad(number_format((float) $data->marketstat->type->sell->max, 2),18," ",STR_PAD_LEFT);
135
+                $lowBuy = str_pad(number_format((float) $data->marketstat->type->buy->min, 2), 18, " ", STR_PAD_LEFT);
136
+                $avgBuy = str_pad(number_format((float) $data->marketstat->type->buy->avg, 2), 18, " ", STR_PAD_LEFT);
137
+                $highBuy = str_pad(number_format((float) $data->marketstat->type->buy->max, 2), 18, " ", STR_PAD_LEFT);
138
+                $lowSell = str_pad(number_format((float) $data->marketstat->type->sell->min, 2), 18, " ", STR_PAD_LEFT);
139
+                $avgSell = str_pad(number_format((float) $data->marketstat->type->sell->avg, 2), 18, " ", STR_PAD_LEFT);
140
+                $highSell = str_pad(number_format((float) $data->marketstat->type->sell->max, 2), 18, " ", STR_PAD_LEFT);
141 141
 
142 142
                 $this->logger->addInfo("Price: Sending pricing info to {$user}");
143 143
                 $solarSystemName = $systemName === 'pc' ? 'Global' : ucfirst($systemName);
Please login to merge, or discard this patch.
src/plugins/onMessage/sysInfo.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	{
30 30
 		$channelID = (int) $msgData['message']['channelID'];
31 31
 
32
-		if(in_array($channelID, $this->excludeChannel, true))
32
+		if (in_array($channelID, $this->excludeChannel, true))
33 33
 		{
34 34
 			return null;
35 35
 		}
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 		$user = $msgData['message']['from'];
41 41
 
42 42
 		$data = command($message, $this->information()['trigger'], $this->config['bot']['trigger']);
43
-		if(isset($data['trigger']))
43
+		if (isset($data['trigger']))
44 44
 		{
45 45
 			$messageString = strstr($data['messageString'], '@') ? str_replace('<@', '', str_replace('>', '', $data['messageString'])) : $data['messageString'];
46
-			if(is_numeric($messageString))
46
+			if (is_numeric($messageString))
47 47
 			{
48 48
 				$messageString = dbQueryField('SELECT name FROM usersSeen WHERE id = :id', 'name', array(':id' => $messageString));
49 49
 			}
@@ -51,29 +51,29 @@  discard block
 block discarded – undo
51 51
 			$sysID = urlencode(systemID($cleanString));
52 52
 
53 53
 			//Check if we get a system back, otherwise check for partials
54
-			if(empty($sysID))
54
+			if (empty($sysID))
55 55
 			{
56 56
 				$search = "http://tools.pandemic-legion.pl/api/search/{$cleanString}";
57 57
 				$search = json_decode(file_get_contents($search));
58 58
 				$tot = 0;
59 59
 				$res = array();
60
-				foreach ($search as $s){
61
-					if ($s->type == "system"){
60
+				foreach ($search as $s) {
61
+					if ($s->type == "system") {
62 62
 						$tot++;
63 63
 						$res[] = $s->name;
64 64
 					}
65 65
 				}
66
-				if ($tot == 0){
66
+				if ($tot == 0) {
67 67
 					return $this->message->reply('**Error:** no data available');
68 68
 				}
69
-				if ($tot == 1){
69
+				if ($tot == 1) {
70 70
 					$sysID = urlencode(systemID($res[0]));
71
-					if(empty($sysID)){
71
+					if (empty($sysID)) {
72 72
 						return $this->message->reply('**Error:** no data available');
73 73
 					}
74 74
 				}
75
-				if ($tot > 1){
76
-					$res = implode(", ",$res);
75
+				if ($tot > 1) {
76
+					$res = implode(", ", $res);
77 77
 					return $this->message->reply("**Error:** Did you mean one of these? {$res}");
78 78
 				}			
79 79
 			}
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 			$regionDetails = regionDetails($regionID);
92 92
 			$regionName = $regionDetails['name'];
93 93
 
94
-			$thisMonth = (string)date('Ym');
95
-            $lastMonth = (string)date('Ym', strtotime('first day of previous month'));
94
+			$thisMonth = (string) date('Ym');
95
+            $lastMonth = (string) date('Ym', strtotime('first day of previous month'));
96 96
 
97 97
             $thisMonthKill = $json->months->$thisMonth->shipsDestroyed;
98 98
             $lastMonthKill = $json->months->$lastMonth->shipsDestroyed;
@@ -102,12 +102,12 @@  discard block
 block discarded – undo
102 102
             $activeChars = $activePVP->characters->count;
103 103
 
104 104
 			$sysName = $systemDetails['name'];
105
-			$secStatus = round($systemDetails['security_status'],2);
105
+			$secStatus = round($systemDetails['security_status'], 2);
106 106
 
107 107
 			$npc = "https://api.eveonline.com/map/kills.xml.aspx";
108 108
 			$npc = new SimpleXMLElement(file_get_contents($npc));
109
-			foreach($npc->result->rowset->row as $row){
110
-				if($row->attributes()->solarSystemID == $sysID){
109
+			foreach ($npc->result->rowset->row as $row) {
110
+				if ($row->attributes()->solarSystemID == $sysID) {
111 111
 					$npcKills = $row->attributes()->factionKills;
112 112
 					$podKills = $row->attributes()->podKills;
113 113
 				}
Please login to merge, or discard this patch.