We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -44,8 +44,8 @@ |
||
44 | 44 | */ |
45 | 45 | public function getValue() : int { |
46 | 46 | if ($this->rank == self::RANK_JACK || |
47 | - $this->rank == self::RANK_QUEEN || |
|
48 | - $this->rank == self::RANK_KING) { |
|
47 | + $this->rank == self::RANK_QUEEN || |
|
48 | + $this->rank == self::RANK_KING) { |
|
49 | 49 | return 10; |
50 | 50 | } elseif ($this->isAce()) { |
51 | 51 | return 11; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | foreach (\Globals::getGoods() as $goodId => $value) { |
94 | 94 | if ($goods[$goodId] === true) { |
95 | 95 | if ($sectors[$currentSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_SELLS && |
96 | - $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_BUYS) { |
|
96 | + $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_BUYS) { |
|
97 | 97 | $rl[] = new OneWayRoute($currentSectorId, $targetSectorId, $raceID, $sectors[$targetSectorId]->getPort()->getRaceID(), $sectors[$currentSectorId]->getPort()->getGoodDistance($goodId), $sectors[$targetSectorId]->getPort()->getGoodDistance($goodId), $distance, $goodId); |
98 | 98 | } |
99 | 99 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | foreach (\Globals::getGoods() as $goodId => $value) { |
122 | 122 | if ($goods[$goodId] === true) { |
123 | 123 | if ($sectors[$currentSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_SELLS && |
124 | - $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_BUYS) { |
|
124 | + $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_BUYS) { |
|
125 | 125 | $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); |
126 | 126 | $fakeReturn = new OneWayRoute($targetSectorId, $currentSectorId, $sectors[$targetSectorId]->getPort()->getRaceID(), $sectors[$currentSectorId]->getPort()->getRaceID(), 0, 0, $distance, GOODS_NOTHING); |
127 | 127 | $mpr = new MultiplePortRoute($owr, $fakeReturn); |
@@ -3,10 +3,10 @@ |
||
3 | 3 | // Holds information linking the received message and the game data |
4 | 4 | class GameLink |
5 | 5 | { |
6 | - public $valid = false; // identifies if the message is linked to game data |
|
7 | - public $account; // SmrAccount instance |
|
8 | - public $alliance; // SmrAlliance instance |
|
9 | - public $player; // SmrPlayer instance |
|
6 | + public $valid = false; // identifies if the message is linked to game data |
|
7 | + public $account; // SmrAccount instance |
|
8 | + public $alliance; // SmrAlliance instance |
|
9 | + public $player; // SmrPlayer instance |
|
10 | 10 | |
11 | 11 | // $author can be either Discord\Parts\User\{User,Member} |
12 | 12 | function __construct(Discord\Parts\Channel\Channel $channel, $author) { |
@@ -33,7 +33,7 @@ |
||
33 | 33 | $query = "SELECT table_name FROM information_schema.tables WHERE table_rows > 0 AND TABLE_SCHEMA='smr_live'"; |
34 | 34 | $rs = self::$conn->query($query); |
35 | 35 | $all = $rs->fetch_all(); |
36 | - array_walk_recursive($all, function ($a) { |
|
36 | + array_walk_recursive($all, function($a) { |
|
37 | 37 | self::$defaultPopulatedTables[] = "'" . $a . "'"; |
38 | 38 | }); |
39 | 39 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | public function __construct() { |
11 | 11 | if (!self::$dbConn) { |
12 | 12 | // Set the mysqli driver to raise exceptions on errors |
13 | - if (!mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT)) { |
|
13 | + if (!mysqli_report(MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT)) { |
|
14 | 14 | $this->error('Failed to enable mysqli error reporting'); |
15 | 15 | } |
16 | 16 | $mysqlProperties = new MySqlProperties(); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | $db->switchDatabases($var['HistoryDatabase']); |
13 | 13 | $db->query('SELECT start_date, type, end_date, game_name, speed, game_id ' . |
14 | - 'FROM game WHERE game_id = ' . $db->escapeNumber($game_id)); |
|
14 | + 'FROM game WHERE game_id = ' . $db->escapeNumber($game_id)); |
|
15 | 15 | $db->requireRecord(); |
16 | 16 | $template->assign('GameName', $game_name); |
17 | 17 | $template->assign('Start', date(DATE_DATE_SHORT, $db->getInt('start_date'))); |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | |
59 | 59 | $totalShieldDamage = 0; |
60 | 60 | foreach ($attackers as $attacker) { |
61 | - $playerResults =& $attacker->shootPlanet($planet, false); |
|
62 | - $results['Attackers']['Traders'][$attacker->getAccountID()] =& $playerResults; |
|
61 | + $playerResults = & $attacker->shootPlanet($planet, false); |
|
62 | + $results['Attackers']['Traders'][$attacker->getAccountID()] = & $playerResults; |
|
63 | 63 | $results['Attackers']['TotalDamage'] += $playerResults['TotalDamage']; |
64 | 64 | foreach ($playerResults['Weapons'] as $weapon) { |
65 | 65 | $totalShieldDamage += $weapon['ActualDamage']['Shield']; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $downgradeDamage = $results['Attackers']['TotalDamage'] - $totalShieldDamage; |
71 | 71 | $results['Attackers']['Downgrades'] = $planet->checkForDowngrade($downgradeDamage); |
72 | 72 | |
73 | -$results['Planet'] =& $planet->shootPlayers($attackers); |
|
73 | +$results['Planet'] = & $planet->shootPlayers($attackers); |
|
74 | 74 | |
75 | 75 | $account->log(LOG_TYPE_PLANET_BUSTING, 'Player attacks planet, the planet does ' . $results['Planet']['TotalDamage'] . ', their team does ' . $results['Attackers']['TotalDamage'] . ' and downgrades: ' . var_export($results['Attackers']['Downgrades'], true), $planet->getSectorID()); |
76 | 76 |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | |
54 | 54 | $totalShieldDamage = 0; |
55 | 55 | foreach ($attackers as $attacker) { |
56 | - $playerResults =& $attacker->shootPort($port); |
|
57 | - $results['Attackers']['Traders'][$attacker->getAccountID()] =& $playerResults; |
|
56 | + $playerResults = & $attacker->shootPort($port); |
|
57 | + $results['Attackers']['Traders'][$attacker->getAccountID()] = & $playerResults; |
|
58 | 58 | $results['Attackers']['TotalDamage'] += $playerResults['TotalDamage']; |
59 | 59 | foreach ($playerResults['Weapons'] as $weapon) { |
60 | 60 | $totalShieldDamage += $weapon['ActualDamage']['Shield']; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $downgradeDamage = $results['Attackers']['TotalDamage'] - $totalShieldDamage; |
66 | 66 | $results['Attackers']['Downgrades'] = $port->checkForDowngrade($downgradeDamage); |
67 | 67 | |
68 | -$results['Port'] =& $port->shootPlayers($attackers); |
|
68 | +$results['Port'] = & $port->shootPlayers($attackers); |
|
69 | 69 | |
70 | 70 | $account->log(LOG_TYPE_PORT_RAIDING, 'Player attacks port, the port does ' . $results['Port']['TotalDamage'] . ', their team does ' . $results['Attackers']['TotalDamage'] . ' and downgrades ' . $results['Attackers']['Downgrades'] . ' levels.', $port->getSectorID()); |
71 | 71 |