We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -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); |
@@ -20,7 +20,9 @@ |
||
20 | 20 | } |
21 | 21 | |
22 | 22 | public static function cmpNum($a, $b) { |
23 | - if ($a == $b) return 0; |
|
23 | + if ($a == $b) { |
|
24 | + return 0; |
|
25 | + } |
|
24 | 26 | return (self::$reverseOrder ? -1 : 1) * ($a < $b ? -1 : 1); |
25 | 27 | } |
26 | 28 |
@@ -80,7 +80,7 @@ |
||
80 | 80 | $return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
81 | 81 | return $return; |
82 | 82 | } |
83 | - $damage =& $this->getModifiedDamage(); |
|
83 | + $damage = & $this->getModifiedDamage(); |
|
84 | 84 | $damage['Launched'] = ICeil($this->getNumberOfSDs() * $this->getModifiedForceAccuracyAgainstPlayer($forces, $targetPlayer) / 100); |
85 | 85 | $damage['MaxDamage'] = ICeil($damage['Launched'] * $damage['MaxDamage']); |
86 | 86 | $damage['Shield'] = ICeil($damage['Launched'] * $damage['Shield']); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | // Delete all tickets and re-insert the winning ticket |
24 | 24 | $db->query('DELETE FROM player_has_ticket WHERE game_id = ' . $db->escapeNumber($gameID)); |
25 | 25 | $db->query('INSERT INTO player_has_ticket (game_id, account_id, time, prize) ' |
26 | - .'VALUES (' . $db->escapeNumber($gameID) . ',' . $db->escapeNumber($winner_id) . ',\'0\',' . $db->escapeNumber($lottoInfo['Prize']) . ')'); |
|
26 | + .'VALUES (' . $db->escapeNumber($gameID) . ',' . $db->escapeNumber($winner_id) . ',\'0\',' . $db->escapeNumber($lottoInfo['Prize']) . ')'); |
|
27 | 27 | |
28 | 28 | //get around locked table problem |
29 | 29 | $lottoWon = true; |
@@ -100,16 +100,16 @@ |
||
100 | 100 | $container['view_game_id'] = $var['view_game_id']; |
101 | 101 | $container['game_name'] = $var['game_name']; |
102 | 102 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
103 | - 'Text' => 'Game Details']; |
|
103 | + 'Text' => 'Game Details']; |
|
104 | 104 | $container['body'] = 'history_games_detail.php'; |
105 | 105 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
106 | - 'Text' => 'Extended Stats']; |
|
106 | + 'Text' => 'Extended Stats']; |
|
107 | 107 | $container['body'] = 'history_games_hof.php'; |
108 | 108 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
109 | - 'Text' => 'Hall of Fame']; |
|
109 | + 'Text' => 'Hall of Fame']; |
|
110 | 110 | $container['body'] = 'history_games_news.php'; |
111 | 111 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
112 | - 'Text' => 'Game News']; |
|
112 | + 'Text' => 'Game News']; |
|
113 | 113 | // make the selected index bold |
114 | 114 | $boldItem =& $menuItems[$selected_index]['Text']; |
115 | 115 | $boldItem = '<b>' . $boldItem . '</b>'; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $menuItems[] = array('Link'=>Globals::getPlanetListHREF($alliance_id), 'Text'=>'Defense'); |
13 | 13 | $menuItems[] = array('Link'=>Globals::getPlanetListFinancialHREF($alliance_id), 'Text'=>'Financial'); |
14 | 14 | // make the selected index bold |
15 | - $boldItem =& $menuItems[$selected_index]['Text']; |
|
15 | + $boldItem = & $menuItems[$selected_index]['Text']; |
|
16 | 16 | $boldItem = '<span class="bold">' . $boldItem . '</span>'; |
17 | 17 | $template->assign('MenuItems', $menuItems); |
18 | 18 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
108 | 108 | 'Text' => 'Game News']; |
109 | 109 | // make the selected index bold |
110 | - $boldItem =& $menuItems[$selected_index]['Text']; |
|
110 | + $boldItem = & $menuItems[$selected_index]['Text']; |
|
111 | 111 | $boldItem = '<b>' . $boldItem . '</b>'; |
112 | 112 | $template->assign('MenuItems', $menuItems); |
113 | 113 | } |
@@ -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) { |
@@ -707,7 +707,7 @@ |
||
707 | 707 | if ($buildingTypeID === false) { |
708 | 708 | $structs = $this->typeInfo::STRUCTURES; |
709 | 709 | return array_combine(array_keys($structs), |
710 | - array_column($structs, 'max_amount')); |
|
710 | + array_column($structs, 'max_amount')); |
|
711 | 711 | } |
712 | 712 | return $this->getStructureTypes($buildingTypeID)->maxAmount(); |
713 | 713 | } |
@@ -1146,7 +1146,7 @@ discard block |
||
1146 | 1146 | $results['DeadBeforeShot'] = false; |
1147 | 1147 | $weapons = $this->getWeapons(); |
1148 | 1148 | foreach ($weapons as $orderID => $weapon) { |
1149 | - $results['Weapons'][$orderID] =& $weapon->shootPlayerAsPlanet($this, $targetPlayers[array_rand($targetPlayers)]); |
|
1149 | + $results['Weapons'][$orderID] = & $weapon->shootPlayerAsPlanet($this, $targetPlayers[array_rand($targetPlayers)]); |
|
1150 | 1150 | if ($results['Weapons'][$orderID]['Hit']) { |
1151 | 1151 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
1152 | 1152 | $results['TotalDamagePerTargetPlayer'][$results['Weapons'][$orderID]['TargetPlayer']->getAccountID()] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
@@ -1154,7 +1154,7 @@ discard block |
||
1154 | 1154 | } |
1155 | 1155 | if ($this->hasCDs()) { |
1156 | 1156 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs(), true); |
1157 | - $results['Drones'] =& $thisCDs->shootPlayerAsPlanet($this, $targetPlayers[array_rand($targetPlayers)]); |
|
1157 | + $results['Drones'] = & $thisCDs->shootPlayerAsPlanet($this, $targetPlayers[array_rand($targetPlayers)]); |
|
1158 | 1158 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
1159 | 1159 | $results['TotalDamagePerTargetPlayer'][$results['Drones']['TargetPlayer']->getAccountID()] += $results['Drones']['ActualDamage']['TotalDamage']; |
1160 | 1160 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * Access properties of structures that this planet type can build. |
42 | 42 | */ |
43 | - public function structureTypes($structureID=false) { |
|
43 | + public function structureTypes($structureID = false) { |
|
44 | 44 | if (!isset($this->structures)) { |
45 | 45 | foreach (static::STRUCTURES as $ID => $Info) { |
46 | 46 | $this->structures[$ID] = new SmrPlanetStructureType($ID, $Info); |
@@ -77,12 +77,12 @@ discard block |
||
77 | 77 | 'exp_gain' => 540, |
78 | 78 | ], |
79 | 79 | ]; |
80 | - public function name() { return "Terran Planet"; } |
|
81 | - public function imageLink() { return "images/planet1.png"; } |
|
82 | - public function description() { return "A lush world, with forests, seas, sweeping meadows, and indigenous lifeforms."; } |
|
80 | + public function name() { return "Terran Planet"; } |
|
81 | + public function imageLink() { return "images/planet1.png"; } |
|
82 | + public function description() { return "A lush world, with forests, seas, sweeping meadows, and indigenous lifeforms."; } |
|
83 | 83 | public function maxAttackers() { return 10; } |
84 | - public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
85 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
84 | + public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
85 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | class AridPlanet extends SmrPlanetType { |
@@ -106,12 +106,12 @@ discard block |
||
106 | 106 | 'exp_gain' => 180, |
107 | 107 | ], |
108 | 108 | ]; |
109 | - public function name() { return "Arid Planet"; } |
|
110 | - public function imageLink() { return "images/planet2.png"; } |
|
111 | - public function description() { return "A world mostly devoid of surface water, but capable of supporting life."; } |
|
109 | + public function name() { return "Arid Planet"; } |
|
110 | + public function imageLink() { return "images/planet2.png"; } |
|
111 | + public function description() { return "A world mostly devoid of surface water, but capable of supporting life."; } |
|
112 | 112 | public function maxAttackers() { return 5; } |
113 | - public function maxLanded() { return 5; } |
|
114 | - public function menuOptions() { return ['CONSTRUCTION', 'DEFENSE', 'STOCKPILE', 'OWNERSHIP']; } |
|
113 | + public function maxLanded() { return 5; } |
|
114 | + public function menuOptions() { return ['CONSTRUCTION', 'DEFENSE', 'STOCKPILE', 'OWNERSHIP']; } |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | class DwarfPlanet extends SmrPlanetType { |
@@ -135,12 +135,12 @@ discard block |
||
135 | 135 | 'exp_gain' => 540, |
136 | 136 | ], |
137 | 137 | ]; |
138 | - public function name() { return "Dwarf Planet"; } |
|
139 | - public function imageLink() { return "images/planet3.png"; } |
|
140 | - public function description() { return "A smaller than usual planet, with no native life present."; } |
|
138 | + public function name() { return "Dwarf Planet"; } |
|
139 | + public function imageLink() { return "images/planet3.png"; } |
|
140 | + public function description() { return "A smaller than usual planet, with no native life present."; } |
|
141 | 141 | public function maxAttackers() { return 5; } |
142 | - public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
143 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
142 | + public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
143 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | class ProtoPlanet extends SmrPlanetType { |
@@ -170,12 +170,12 @@ discard block |
||
170 | 170 | 'exp_gain' => 540, |
171 | 171 | ], |
172 | 172 | ]; |
173 | - public function name() { return "Protoplanet"; } |
|
174 | - public function imageLink() { return "images/planet5.png"; } |
|
175 | - public function description() { return "A developing planet, not yet able to support the infrastructure of advanced technologies."; } |
|
173 | + public function name() { return "Protoplanet"; } |
|
174 | + public function imageLink() { return "images/planet5.png"; } |
|
175 | + public function description() { return "A developing planet, not yet able to support the infrastructure of advanced technologies."; } |
|
176 | 176 | public function maxAttackers() { return 5; } |
177 | - public function maxLanded() { return 5; } |
|
178 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
177 | + public function maxLanded() { return 5; } |
|
178 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | class DefenseWorld extends SmrPlanetType { |
@@ -205,10 +205,10 @@ discard block |
||
205 | 205 | 'exp_gain' => 9, |
206 | 206 | ], |
207 | 207 | ]; |
208 | - public function name() { return "Defense World"; } |
|
209 | - public function imageLink() { return "images/planet4.png"; } |
|
210 | - public function description() { return "A fully armed and operational battle station loaded with excessive firepower."; } |
|
208 | + public function name() { return "Defense World"; } |
|
209 | + public function imageLink() { return "images/planet4.png"; } |
|
210 | + public function description() { return "A fully armed and operational battle station loaded with excessive firepower."; } |
|
211 | 211 | public function maxAttackers() { return 10; } |
212 | - public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
213 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
212 | + public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
213 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
214 | 214 | } |
@@ -469,8 +469,9 @@ |
||
469 | 469 | |
470 | 470 | if (!$player->isDead() && $player->getNewbieTurns() <= NEWBIE_TURNS_WARNING_LIMIT && |
471 | 471 | $player->getNewbieWarning() && |
472 | - $var['url'] != 'newbie_warning_processing.php') |
|
473 | - forward(create_container('newbie_warning_processing.php')); |
|
472 | + $var['url'] != 'newbie_warning_processing.php') { |
|
473 | + forward(create_container('newbie_warning_processing.php')); |
|
474 | + } |
|
474 | 475 | } |
475 | 476 | |
476 | 477 | // Initialize the template |