We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | $totalPlayers = $player->getGame()->getTotalPlayers(); |
26 | 26 | |
27 | -$profitRanks = function (int $minRank, int $maxRank) use ($player, $db, $profitTypeEscaped) : array { |
|
27 | +$profitRanks = function(int $minRank, int $maxRank) use ($player, $db, $profitTypeEscaped) : array { |
|
28 | 28 | $offset = $minRank - 1; |
29 | 29 | $limit = $maxRank - $offset; |
30 | 30 | $db->query('SELECT p.*, COALESCE(ph.amount,0) amount FROM player p LEFT JOIN player_hof ph ON p.account_id = ph.account_id AND p.game_id = ph.game_id AND ph.type = ' . $profitTypeEscaped . ' WHERE p.game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY amount DESC, player_name ASC LIMIT ' . $offset . ', ' . $limit); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | foreach (\Globals::getGoods() as $goodId => $value) { |
91 | 91 | if ($goods[$goodId] === true) { |
92 | 92 | if ($sectors[$currentSectorId]->getPort()->getGoodTransaction($goodId) === TRADER_SELLS && |
93 | - $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === TRADER_BUYS) { |
|
93 | + $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === TRADER_BUYS) { |
|
94 | 94 | $rl[] = new OneWayRoute($currentSectorId, $targetSectorId, $raceID, $sectors[$targetSectorId]->getPort()->getRaceID(), $sectors[$currentSectorId]->getPort()->getGoodDistance($goodId), $sectors[$targetSectorId]->getPort()->getGoodDistance($goodId), $distance, $goodId); |
95 | 95 | } |
96 | 96 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | foreach (\Globals::getGoods() as $goodId => $value) { |
119 | 119 | if ($goods[$goodId] === true) { |
120 | 120 | if ($sectors[$currentSectorId]->getPort()->getGoodTransaction($goodId) === TRADER_SELLS && |
121 | - $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === TRADER_BUYS) { |
|
121 | + $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === TRADER_BUYS) { |
|
122 | 122 | $owr = new OneWayRoute($currentSectorId, $targetSectorId, $sectors[$currentSectorId]->getPort()->getRaceID(), $sectors[$targetSectorId]->getPort()->getRaceID(), $sectors[$currentSectorId]->getPort()->getGoodDistance($goodId), $sectors[$targetSectorId]->getPort()->getGoodDistance($goodId), $distance, $goodId); |
123 | 123 | $fakeReturn = new OneWayRoute($targetSectorId, $currentSectorId, $sectors[$targetSectorId]->getPort()->getRaceID(), $sectors[$currentSectorId]->getPort()->getRaceID(), 0, 0, $distance, GOODS_NOTHING); |
124 | 124 | $mpr = new MultiplePortRoute($owr, $fakeReturn); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | /** |
22 | 22 | * @var $messagePlayer SmrPlayer | string |
23 | 23 | */ |
24 | - $getName = function ($messagePlayer) use ($container, $account) : string { |
|
24 | + $getName = function($messagePlayer) use ($container, $account) : string { |
|
25 | 25 | $name = $messagePlayer; |
26 | 26 | if ($messagePlayer instanceof SmrPlayer) { |
27 | 27 | $name = $messagePlayer->getAccount()->getLogin(); |
@@ -1219,7 +1219,7 @@ discard block |
||
1219 | 1219 | do { |
1220 | 1220 | $targetPlayer = array_rand_value($targetPlayers); |
1221 | 1221 | } while ($results['TotalShotsPerTargetPlayer'][$targetPlayer->getAccountID()] > min($results['TotalShotsPerTargetPlayer'])); |
1222 | - $results['Weapons'][$orderID] =& $weapon->shootPlayerAsPort($this, $targetPlayer); |
|
1222 | + $results['Weapons'][$orderID] = & $weapon->shootPlayerAsPort($this, $targetPlayer); |
|
1223 | 1223 | $results['TotalShotsPerTargetPlayer'][$targetPlayer->getAccountID()]++; |
1224 | 1224 | if ($results['Weapons'][$orderID]['Hit']) { |
1225 | 1225 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
@@ -1228,7 +1228,7 @@ discard block |
||
1228 | 1228 | } |
1229 | 1229 | if ($this->hasCDs()) { |
1230 | 1230 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs(), true); |
1231 | - $results['Drones'] =& $thisCDs->shootPlayerAsPort($this, array_rand_value($targetPlayers)); |
|
1231 | + $results['Drones'] = & $thisCDs->shootPlayerAsPort($this, array_rand_value($targetPlayers)); |
|
1232 | 1232 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
1233 | 1233 | $results['TotalDamagePerTargetPlayer'][$results['Drones']['TargetPlayer']->getAccountID()] += $results['Drones']['ActualDamage']['TotalDamage']; |
1234 | 1234 | } |
@@ -460,20 +460,20 @@ |
||
460 | 460 | |
461 | 461 | if ($this->hasMines()) { |
462 | 462 | $thisMines = new SmrMines($this->getGameID(), $this->getMines()); |
463 | - $results['Results']['Mines'] =& $thisMines->shootPlayerAsForce($this, array_rand_value($targetPlayers), $minesAreAttacker); |
|
463 | + $results['Results']['Mines'] = & $thisMines->shootPlayerAsForce($this, array_rand_value($targetPlayers), $minesAreAttacker); |
|
464 | 464 | $results['TotalDamage'] += $results['Results']['Mines']['ActualDamage']['TotalDamage']; |
465 | 465 | } |
466 | 466 | |
467 | 467 | if ($this->hasCDs()) { |
468 | 468 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
469 | - $results['Results']['Drones'] =& $thisCDs->shootPlayerAsForce($this, array_rand_value($targetPlayers)); |
|
469 | + $results['Results']['Drones'] = & $thisCDs->shootPlayerAsForce($this, array_rand_value($targetPlayers)); |
|
470 | 470 | $results['TotalDamage'] += $results['Results']['Drones']['ActualDamage']['TotalDamage']; |
471 | 471 | } |
472 | 472 | |
473 | 473 | if (!$minesAreAttacker) { |
474 | 474 | if ($this->hasSDs()) { |
475 | 475 | $thisSDs = new SmrScoutDrones($this->getGameID(), $this->getSDs()); |
476 | - $results['Results']['Scouts'] =& $thisSDs->shootPlayerAsForce($this, array_rand_value($targetPlayers)); |
|
476 | + $results['Results']['Scouts'] = & $thisSDs->shootPlayerAsForce($this, array_rand_value($targetPlayers)); |
|
477 | 477 | $results['TotalDamage'] += $results['Results']['Scouts']['ActualDamage']['TotalDamage']; |
478 | 478 | } |
479 | 479 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | } |
36 | 36 | $helper = self::getTwitterObj($_SESSION['TwitterToken']); |
37 | 37 | $accessToken = $helper->oauth('oauth/access_token', |
38 | - ['oauth_verifier' => \Request::get('oauth_verifier')]); |
|
38 | + ['oauth_verifier' => \Request::get('oauth_verifier')]); |
|
39 | 39 | $auth = self::getTwitterObj($accessToken); |
40 | 40 | $userInfo = $auth->get('account/verify_credentials', ['include_email' => 'true']); |
41 | 41 | if ($auth->getLastHttpCode() == 200) { |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | /** |
247 | 247 | * Check if the account is disabled. |
248 | 248 | */ |
249 | - public function isDisabled() : array | false { |
|
249 | + public function isDisabled() : array|false { |
|
250 | 250 | $this->db->query('SELECT * FROM account_is_closed JOIN closing_reason USING(reason_id) ' . |
251 | 251 | 'WHERE ' . $this->SQL . ' LIMIT 1'); |
252 | 252 | if ($this->db->nextRecord()) { |
@@ -377,13 +377,13 @@ discard block |
||
377 | 377 | $this->db->query('SELECT type,sum(amount) as amount FROM player_hof WHERE ' . $this->SQL . ' AND game_id IN (SELECT game_id FROM game WHERE ignore_stats = \'FALSE\') GROUP BY type'); |
378 | 378 | $this->HOF = array(); |
379 | 379 | while ($this->db->nextRecord()) { |
380 | - $hof =& $this->HOF; |
|
380 | + $hof = & $this->HOF; |
|
381 | 381 | $typeList = explode(':', $this->db->getField('type')); |
382 | 382 | foreach ($typeList as $type) { |
383 | 383 | if (!isset($hof[$type])) { |
384 | 384 | $hof[$type] = array(); |
385 | 385 | } |
386 | - $hof =& $hof[$type]; |
|
386 | + $hof = & $hof[$type]; |
|
387 | 387 | } |
388 | 388 | $hof = $this->db->getFloat('amount'); |
389 | 389 | } |
@@ -340,7 +340,7 @@ |
||
340 | 340 | /** |
341 | 341 | * Check if the galaxy contains a specific sector. |
342 | 342 | */ |
343 | - public function contains(int | SmrSector $sectorID) : bool { |
|
343 | + public function contains(int|SmrSector $sectorID) : bool { |
|
344 | 344 | if ($sectorID instanceof SmrSector) { |
345 | 345 | return $sectorID->getGalaxyID() == $this->getGalaxyID(); |
346 | 346 | } |