@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | if (null === $character) { // Make sure it's always set. |
106 | 106 | return null; |
107 | 107 | } |
108 | - return (string)$character['name']; |
|
108 | + return (string) $character['name']; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | try { |
124 | 124 | $json = file_get_contents($url); |
125 | 125 | $data = json_decode($json, TRUE); |
126 | - $id = (int)$data['character'][0]; |
|
126 | + $id = (int) $data['character'][0]; |
|
127 | 127 | |
128 | 128 | } catch (Exception $e) { |
129 | 129 | $logger->error('EVE ESI Error: ' . $e->getMessage()); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | try { |
171 | 171 | $json = file_get_contents($url); |
172 | 172 | $data = json_decode($json, TRUE); |
173 | - $name = (string)$data['solar_system_name']; |
|
173 | + $name = (string) $data['solar_system_name']; |
|
174 | 174 | |
175 | 175 | } catch (Exception $e) { |
176 | 176 | $logger->error('EVE ESI Error: ' . $e->getMessage()); |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | try { |
196 | 196 | $json = file_get_contents($url); |
197 | 197 | $data = json_decode($json, TRUE); |
198 | - $id = (int)$data['corporation'][0]; |
|
198 | + $id = (int) $data['corporation'][0]; |
|
199 | 199 | |
200 | 200 | } catch (Exception $e) { |
201 | 201 | $logger->error('EVE ESI Error: ' . $e->getMessage()); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | function corpName($corpID) |
215 | 215 | { |
216 | 216 | $corporation = corpDetails($corpID); |
217 | - $name = (string)$corporation['corporation_name']; |
|
217 | + $name = (string) $corporation['corporation_name']; |
|
218 | 218 | |
219 | 219 | if (null === $corporation) { // Make sure it's always set. |
220 | 220 | return null; |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | $url = "https://esi.tech.ccp.is/latest/alliances/{$allianceID}/"; |
257 | 257 | $json = file_get_contents($url); |
258 | 258 | $data = json_decode($json, TRUE); |
259 | - $name = (string)$data['alliance_name']; |
|
259 | + $name = (string) $data['alliance_name']; |
|
260 | 260 | |
261 | 261 | if (null === $name) { // Make sure it's always set. |
262 | 262 | $name = 'Unknown'; |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | $url = "https://esi.tech.ccp.is/latest/search/?search={$systemName}&categories=solarsystem&language=en-us&strict=true&datasource=tranquility"; |
277 | 277 | $json = file_get_contents($url); |
278 | 278 | $data = json_decode($json, TRUE); |
279 | - $id = (int)$data['solarsystem'][0]; |
|
279 | + $id = (int) $data['solarsystem'][0]; |
|
280 | 280 | |
281 | 281 | if (null === $id) { // Make sure it's always set. |
282 | 282 | $id = 'Unknown'; |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | $url = "https://esi.tech.ccp.is/latest/universe/types/{$typeID}/"; |
296 | 296 | $json = file_get_contents($url); |
297 | 297 | $data = json_decode($json, TRUE); |
298 | - $name = (string)$data['type_name']; |
|
298 | + $name = (string) $data['type_name']; |
|
299 | 299 | |
300 | 300 | if (null === $name) { // Make sure it's always set. |
301 | 301 | $name = 'Unknown'; |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | $url = "https://www.fuzzwork.co.uk/api/typeid.php?typename={$typeName}"; |
316 | 316 | $json = file_get_contents($url); |
317 | 317 | $data = json_decode($json, TRUE); |
318 | - $id = (int)$data['typeID']; |
|
318 | + $id = (int) $data['typeID']; |
|
319 | 319 | |
320 | 320 | if (null === $id) { // Make sure it's always set. |
321 | 321 | $id = 'Unknown'; |
@@ -108,15 +108,15 @@ discard block |
||
108 | 108 | $rawGoo = array(16634, 16643, 16647, 16641, 16640, 16635, 16648, 16633, 16646, 16651, 16650, 16644, 16652, 16639, 16636, 16649, 16653, 16638, 16637, 16642); |
109 | 109 | foreach ($xml->result->rowset->row as $structures) { |
110 | 110 | //Check silos |
111 | - if ((int)$structures->attributes()->typeID === 14343) { |
|
111 | + if ((int) $structures->attributes()->typeID === 14343) { |
|
112 | 112 | if (isset($structures->rowset->row)) { |
113 | 113 | foreach ($structures->rowset->row as $silo) { |
114 | 114 | //Avoid reporting empty silos |
115 | - if ((int)$silo->attributes()->quantity !== 0 && in_array($silo->attributes()->typeID, $rawGoo, false)) { |
|
115 | + if ((int) $silo->attributes()->quantity !== 0 && in_array($silo->attributes()->typeID, $rawGoo, false)) { |
|
116 | 116 | $siloID = $structures->attributes()->itemID; |
117 | 117 | $lastAmount = getPermCache("silo{$siloID}Amount"); |
118 | 118 | $gooAmount = $silo->attributes()->quantity; |
119 | - $gooDifference = (int)$gooAmount - (int)$lastAmount; |
|
119 | + $gooDifference = (int) $gooAmount - (int) $lastAmount; |
|
120 | 120 | //Check if silo has been checked before |
121 | 121 | if (null === $lastAmount || $gooDifference < 0) { |
122 | 122 | setPermCache("silo{$siloID}Amount", $gooAmount); |
@@ -140,15 +140,15 @@ discard block |
||
140 | 140 | } |
141 | 141 | } |
142 | 142 | } |
143 | - if ((int)$structures->attributes()->typeID === 17982) { |
|
143 | + if ((int) $structures->attributes()->typeID === 17982) { |
|
144 | 144 | if (isset($structures->rowset->row)) { |
145 | 145 | foreach ($structures->rowset->row as $coupling) { |
146 | 146 | //Avoid reporting empty coupling arrays |
147 | - if ((int)$coupling->attributes()->quantity !== 0 && in_array($coupling->attributes()->typeID, $rawGoo, false)) { |
|
147 | + if ((int) $coupling->attributes()->quantity !== 0 && in_array($coupling->attributes()->typeID, $rawGoo, false)) { |
|
148 | 148 | $couplingID = $structures->attributes()->itemID; |
149 | 149 | $lastAmount = getPermCache("couplingArray{$couplingID}Amount"); |
150 | 150 | $gooAmount = $coupling->attributes()->quantity; |
151 | - $gooDifference = (int)$gooAmount - (int)$lastAmount; |
|
151 | + $gooDifference = (int) $gooAmount - (int) $lastAmount; |
|
152 | 152 | //Check if silo has been checked before |
153 | 153 | if (null === $lastAmount || $gooDifference < 0) { |
154 | 154 | setPermCache("couplingArray{$couplingID}Amount", $gooAmount); |