We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -79,12 +79,12 @@ discard block |
||
79 | 79 | 'exp_gain' => 540, |
80 | 80 | ], |
81 | 81 | ]; |
82 | - public function name() { return "Terran Planet"; } |
|
83 | - public function imageLink() { return "images/planet1.png"; } |
|
84 | - public function description() { return "A lush world, with forests, seas, sweeping meadows, and indigenous lifeforms."; } |
|
82 | + public function name() { return "Terran Planet"; } |
|
83 | + public function imageLink() { return "images/planet1.png"; } |
|
84 | + public function description() { return "A lush world, with forests, seas, sweeping meadows, and indigenous lifeforms."; } |
|
85 | 85 | public function maxAttackers() { return 10; } |
86 | - public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
87 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
86 | + public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
87 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | class AridPlanet extends SmrPlanetType { |
@@ -108,12 +108,12 @@ discard block |
||
108 | 108 | 'exp_gain' => 180, |
109 | 109 | ], |
110 | 110 | ]; |
111 | - public function name() { return "Arid Planet"; } |
|
112 | - public function imageLink() { return "images/planet2.png"; } |
|
113 | - public function description() { return "A world mostly devoid of surface water, but capable of supporting life."; } |
|
111 | + public function name() { return "Arid Planet"; } |
|
112 | + public function imageLink() { return "images/planet2.png"; } |
|
113 | + public function description() { return "A world mostly devoid of surface water, but capable of supporting life."; } |
|
114 | 114 | public function maxAttackers() { return 5; } |
115 | - public function maxLanded() { return 5; } |
|
116 | - public function menuOptions() { return ['CONSTRUCTION', 'DEFENSE', 'STOCKPILE', 'OWNERSHIP']; } |
|
115 | + public function maxLanded() { return 5; } |
|
116 | + public function menuOptions() { return ['CONSTRUCTION', 'DEFENSE', 'STOCKPILE', 'OWNERSHIP']; } |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | class DwarfPlanet extends SmrPlanetType { |
@@ -137,12 +137,12 @@ discard block |
||
137 | 137 | 'exp_gain' => 540, |
138 | 138 | ], |
139 | 139 | ]; |
140 | - public function name() { return "Dwarf Planet"; } |
|
141 | - public function imageLink() { return "images/planet3.png"; } |
|
142 | - public function description() { return "A smaller than usual planet, with no native life present."; } |
|
140 | + public function name() { return "Dwarf Planet"; } |
|
141 | + public function imageLink() { return "images/planet3.png"; } |
|
142 | + public function description() { return "A smaller than usual planet, with no native life present."; } |
|
143 | 143 | public function maxAttackers() { return 5; } |
144 | - public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
145 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
144 | + public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
145 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | class ProtoPlanet extends SmrPlanetType { |
@@ -178,12 +178,12 @@ discard block |
||
178 | 178 | 'exp_gain' => 540, |
179 | 179 | ], |
180 | 180 | ]; |
181 | - public function name() { return "Protoplanet"; } |
|
182 | - public function imageLink() { return "images/planet5.png"; } |
|
183 | - public function description() { return "A developing planet, not yet able to support the infrastructure of advanced technologies."; } |
|
181 | + public function name() { return "Protoplanet"; } |
|
182 | + public function imageLink() { return "images/planet5.png"; } |
|
183 | + public function description() { return "A developing planet, not yet able to support the infrastructure of advanced technologies."; } |
|
184 | 184 | public function maxAttackers() { return 5; } |
185 | - public function maxLanded() { return 5; } |
|
186 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
185 | + public function maxLanded() { return 5; } |
|
186 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | class DefenseWorld extends SmrPlanetType { |
@@ -213,10 +213,10 @@ discard block |
||
213 | 213 | 'exp_gain' => 9, |
214 | 214 | ], |
215 | 215 | ]; |
216 | - public function name() { return "Defense World"; } |
|
217 | - public function imageLink() { return "images/planet4.png"; } |
|
218 | - public function description() { return "A fully armed and operational battle station loaded with excessive firepower."; } |
|
216 | + public function name() { return "Defense World"; } |
|
217 | + public function imageLink() { return "images/planet4.png"; } |
|
218 | + public function description() { return "A fully armed and operational battle station loaded with excessive firepower."; } |
|
219 | 219 | public function maxAttackers() { return 10; } |
220 | - public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
221 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
220 | + public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
221 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
222 | 222 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
94 | 94 | return $return; |
95 | 95 | } |
96 | - $damage =& $this->getModifiedDamage(); |
|
96 | + $damage = & $this->getModifiedDamage(); |
|
97 | 97 | if ($targetPlayer->getShip()->isFederal()) { // do less damage to fed ships |
98 | 98 | $damage['MaxDamage'] = IRound($damage['MaxDamage'] * self::FED_SHIP_DAMAGE_MODIFIER); |
99 | 99 | $damage['Shield'] = IRound($damage['Shield'] * self::FED_SHIP_DAMAGE_MODIFIER); |
@@ -130,12 +130,12 @@ discard block |
||
130 | 130 | } |
131 | 131 | |
132 | 132 | protected function &doForceDamageToPlayer(array &$return, SmrForce $forces, AbstractSmrPlayer $targetPlayer, $minesAreAttacker = false) { |
133 | - $return['WeaponDamage'] =& $this->getModifiedForceDamageAgainstPlayer($forces, $targetPlayer, $minesAreAttacker); |
|
134 | - $return['ActualDamage'] =& $targetPlayer->getShip()->doMinesDamage($return['WeaponDamage']); |
|
133 | + $return['WeaponDamage'] = & $this->getModifiedForceDamageAgainstPlayer($forces, $targetPlayer, $minesAreAttacker); |
|
134 | + $return['ActualDamage'] = & $targetPlayer->getShip()->doMinesDamage($return['WeaponDamage']); |
|
135 | 135 | $return['ActualDamage']['Launched'] = ICeil($return['WeaponDamage']['Launched'] * $return['ActualDamage']['TotalDamage'] / $return['WeaponDamage']['MaxDamage']); |
136 | 136 | |
137 | 137 | if ($return['ActualDamage']['KillingShot']) { |
138 | - $return['KillResults'] =& $targetPlayer->killPlayerByForces($forces); |
|
138 | + $return['KillResults'] = & $targetPlayer->killPlayerByForces($forces); |
|
139 | 139 | } |
140 | 140 | return $return; |
141 | 141 | } |
@@ -98,7 +98,7 @@ |
||
98 | 98 | global $player, $db; |
99 | 99 | $offset = $minRank - 1; |
100 | 100 | $limit = $maxRank - $offset; |
101 | - $db->query('SELECT alliance_id, alliance_' . $stat . ' AS amount FROM alliance WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY amount DESC, alliance_name LIMIT ' . $offset. ', ' . $limit); |
|
101 | + $db->query('SELECT alliance_id, alliance_' . $stat . ' AS amount FROM alliance WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY amount DESC, alliance_name LIMIT ' . $offset . ', ' . $limit); |
|
102 | 102 | return self::collectAllianceRankings($db, $player, $offset); |
103 | 103 | } |
104 | 104 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $template->assign('OurRank', $ourRank); |
26 | 26 | } |
27 | 27 | |
28 | -$expRanks = function (int $minRank, int $maxRank) use ($player, $db) : array { |
|
28 | +$expRanks = function(int $minRank, int $maxRank) use ($player, $db) : array { |
|
29 | 29 | $offset = $minRank - 1; |
30 | 30 | $limit = $maxRank - $offset; |
31 | 31 | $db->query('SELECT alliance_id, COALESCE(SUM(experience), 0) amount |
@@ -28,7 +28,7 @@ |
||
28 | 28 | $template->assign('OurRank', $ourRank); |
29 | 29 | } |
30 | 30 | |
31 | -$profitRanks = function (int $minRank, int $maxRank) use ($player, $db, $profitTypeEscaped) : array { |
|
31 | +$profitRanks = function(int $minRank, int $maxRank) use ($player, $db, $profitTypeEscaped) : array { |
|
32 | 32 | $offset = $minRank - 1; |
33 | 33 | $limit = $maxRank - $offset; |
34 | 34 | $db->query('SELECT alliance_id, COALESCE(SUM(amount), 0) amount |
@@ -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); |
@@ -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(); |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | public function setWeaponLocations(array $orderArray) { |
311 | 311 | $weapons = $this->weapons; |
312 | 312 | foreach ($orderArray as $newOrder => $oldOrder) { |
313 | - $this->weapons[$newOrder] =& $weapons[$oldOrder]; |
|
313 | + $this->weapons[$newOrder] = & $weapons[$oldOrder]; |
|
314 | 314 | } |
315 | 315 | $this->hasChangedWeapons = true; |
316 | 316 | } |
@@ -939,14 +939,14 @@ discard block |
||
939 | 939 | } |
940 | 940 | $results['DeadBeforeShot'] = false; |
941 | 941 | foreach ($this->weapons as $orderID => $weapon) { |
942 | - $results['Weapons'][$orderID] =& $weapon->shootPlayer($thisPlayer, array_rand_value($targetPlayers)); |
|
942 | + $results['Weapons'][$orderID] = & $weapon->shootPlayer($thisPlayer, array_rand_value($targetPlayers)); |
|
943 | 943 | if ($results['Weapons'][$orderID]['Hit']) { |
944 | 944 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
945 | 945 | } |
946 | 946 | } |
947 | 947 | if ($this->hasCDs()) { |
948 | 948 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
949 | - $results['Drones'] =& $thisCDs->shootPlayer($thisPlayer, array_rand_value($targetPlayers)); |
|
949 | + $results['Drones'] = & $thisCDs->shootPlayer($thisPlayer, array_rand_value($targetPlayers)); |
|
950 | 950 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
951 | 951 | } |
952 | 952 | $thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PLAYER)); |
@@ -964,7 +964,7 @@ discard block |
||
964 | 964 | } |
965 | 965 | $results['DeadBeforeShot'] = false; |
966 | 966 | foreach ($this->weapons as $orderID => $weapon) { |
967 | - $results['Weapons'][$orderID] =& $weapon->shootForces($thisPlayer, $forces); |
|
967 | + $results['Weapons'][$orderID] = & $weapon->shootForces($thisPlayer, $forces); |
|
968 | 968 | if ($results['Weapons'][$orderID]['Hit']) { |
969 | 969 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
970 | 970 | $thisPlayer->increaseHOF($results['Weapons'][$orderID]['ActualDamage']['NumMines'], array('Combat', 'Forces', 'Mines', 'Killed'), HOF_PUBLIC); |
@@ -978,7 +978,7 @@ discard block |
||
978 | 978 | } |
979 | 979 | if ($this->hasCDs()) { |
980 | 980 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
981 | - $results['Drones'] =& $thisCDs->shootForces($thisPlayer, $forces); |
|
981 | + $results['Drones'] = & $thisCDs->shootForces($thisPlayer, $forces); |
|
982 | 982 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
983 | 983 | $thisPlayer->increaseHOF($results['Drones']['ActualDamage']['NumMines'], array('Combat', 'Forces', 'Mines', 'Killed'), HOF_PUBLIC); |
984 | 984 | $thisPlayer->increaseHOF($results['Drones']['ActualDamage']['Mines'], array('Combat', 'Forces', 'Mines', 'Damage Done'), HOF_PUBLIC); |
@@ -1003,14 +1003,14 @@ discard block |
||
1003 | 1003 | } |
1004 | 1004 | $results['DeadBeforeShot'] = false; |
1005 | 1005 | foreach ($this->weapons as $orderID => $weapon) { |
1006 | - $results['Weapons'][$orderID] =& $weapon->shootPort($thisPlayer, $port); |
|
1006 | + $results['Weapons'][$orderID] = & $weapon->shootPort($thisPlayer, $port); |
|
1007 | 1007 | if ($results['Weapons'][$orderID]['Hit']) { |
1008 | 1008 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
1009 | 1009 | } |
1010 | 1010 | } |
1011 | 1011 | if ($this->hasCDs()) { |
1012 | 1012 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
1013 | - $results['Drones'] =& $thisCDs->shootPort($thisPlayer, $port); |
|
1013 | + $results['Drones'] = & $thisCDs->shootPort($thisPlayer, $port); |
|
1014 | 1014 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
1015 | 1015 | } |
1016 | 1016 | $thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PORT)); |
@@ -1041,14 +1041,14 @@ discard block |
||
1041 | 1041 | } |
1042 | 1042 | $results['DeadBeforeShot'] = false; |
1043 | 1043 | foreach ($this->weapons as $orderID => $weapon) { |
1044 | - $results['Weapons'][$orderID] =& $weapon->shootPlanet($thisPlayer, $planet, $delayed); |
|
1044 | + $results['Weapons'][$orderID] = & $weapon->shootPlanet($thisPlayer, $planet, $delayed); |
|
1045 | 1045 | if ($results['Weapons'][$orderID]['Hit']) { |
1046 | 1046 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
1047 | 1047 | } |
1048 | 1048 | } |
1049 | 1049 | if ($this->hasCDs()) { |
1050 | 1050 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
1051 | - $results['Drones'] =& $thisCDs->shootPlanet($thisPlayer, $planet, $delayed); |
|
1051 | + $results['Drones'] = & $thisCDs->shootPlanet($thisPlayer, $planet, $delayed); |
|
1052 | 1052 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
1053 | 1053 | } |
1054 | 1054 | $thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PLANET)); |
@@ -1166,7 +1166,7 @@ discard block |
||
1166 | 1166 | $results['DeadBeforeShot'] = false; |
1167 | 1167 | $weapons = $this->getWeapons(); |
1168 | 1168 | foreach ($weapons as $orderID => $weapon) { |
1169 | - $results['Weapons'][$orderID] =& $weapon->shootPlayerAsPlanet($this, array_rand_value($targetPlayers)); |
|
1169 | + $results['Weapons'][$orderID] = & $weapon->shootPlayerAsPlanet($this, array_rand_value($targetPlayers)); |
|
1170 | 1170 | if ($results['Weapons'][$orderID]['Hit']) { |
1171 | 1171 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
1172 | 1172 | $results['TotalDamagePerTargetPlayer'][$results['Weapons'][$orderID]['TargetPlayer']->getAccountID()] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
@@ -1174,7 +1174,7 @@ discard block |
||
1174 | 1174 | } |
1175 | 1175 | if ($this->hasCDs()) { |
1176 | 1176 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs(), true); |
1177 | - $results['Drones'] =& $thisCDs->shootPlayerAsPlanet($this, array_rand_value($targetPlayers)); |
|
1177 | + $results['Drones'] = & $thisCDs->shootPlayerAsPlanet($this, array_rand_value($targetPlayers)); |
|
1178 | 1178 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
1179 | 1179 | $results['TotalDamagePerTargetPlayer'][$results['Drones']['TargetPlayer']->getAccountID()] += $results['Drones']['ActualDamage']['TotalDamage']; |
1180 | 1180 | } |