@@ -112,7 +112,7 @@ |
||
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 |
@@ -125,7 +125,7 @@ |
||
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 |
@@ -71,7 +71,7 @@ |
||
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'); |
@@ -55,7 +55,7 @@ discard block |
||
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 |
||
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"); |
@@ -229,12 +229,16 @@ |
||
229 | 229 | //CORP INFO |
230 | 230 | /** |
231 | 231 | * @param string $corpName |
232 | + * @param integer $corpID |
|
232 | 233 | */ |
233 | 234 | function addCorpInfo($corpID, $corpTicker, $corpName) |
234 | 235 | { |
235 | 236 | dbExecute('REPLACE INTO corpCache (`corpID`, `corpTicker`, `corpName`) VALUES (:corpID,:corpTicker,:corpName)', array(':corpID' => $corpID, ':corpTicker' => $corpTicker, ':corpName' => $corpName)); |
236 | 237 | } |
237 | 238 | |
239 | +/** |
|
240 | + * @param integer $corpID |
|
241 | + */ |
|
238 | 242 | function getCorpInfo($corpID) |
239 | 243 | { |
240 | 244 | return dbQueryRow('SELECT * FROM corpCache WHERE `corpID` = :corpID', array(':corpID' => $corpID)); |
@@ -93,16 +93,16 @@ discard block |
||
93 | 93 | if ($kmGroup['startMail'] > $killID || null === $killID) { |
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 |
||
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 |