We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -96,7 +96,7 @@ |
||
96 | 96 | } |
97 | 97 | $accountID = (int)$variable; |
98 | 98 | $template->assign('BanAccountID', $accountID); |
99 | - $summary = 'Account ' . $accountID. ' has had the following IPs at the following times.'; |
|
99 | + $summary = 'Account ' . $accountID . ' has had the following IPs at the following times.'; |
|
100 | 100 | $template->assign('Summary', $summary); |
101 | 101 | $db2->query('SELECT * FROM account_exceptions WHERE account_id = ' . $db->escapeNumber($variable)); |
102 | 102 | if ($db2->nextRecord()) { |
@@ -67,68 +67,68 @@ |
||
67 | 67 | abstract public function &getModifiedPlanetDamageAgainstPlayer(SmrPlanet $planet, AbstractSmrPlayer $targetPlayer); |
68 | 68 | |
69 | 69 | protected function &doPlayerDamageToForce(array &$return, AbstractSmrPlayer $weaponPlayer, SmrForce $forces) { |
70 | - $return['WeaponDamage'] =& $this->getModifiedDamageAgainstForces($weaponPlayer,$forces); |
|
71 | - $return['ActualDamage'] =& $forces->doWeaponDamage($return['WeaponDamage']); |
|
70 | + $return['WeaponDamage'] = & $this->getModifiedDamageAgainstForces($weaponPlayer, $forces); |
|
71 | + $return['ActualDamage'] = & $forces->doWeaponDamage($return['WeaponDamage']); |
|
72 | 72 | if ($return['ActualDamage']['KillingShot']) { |
73 | - $return['KillResults'] =& $forces->killForcesByPlayer($weaponPlayer); |
|
73 | + $return['KillResults'] = & $forces->killForcesByPlayer($weaponPlayer); |
|
74 | 74 | } |
75 | 75 | return $return; |
76 | 76 | } |
77 | 77 | |
78 | 78 | protected function &doPlayerDamageToPlayer(array &$return, AbstractSmrPlayer $weaponPlayer, AbstractSmrPlayer $targetPlayer) { |
79 | - $return['WeaponDamage'] =& $this->getModifiedDamageAgainstPlayer($weaponPlayer,$targetPlayer); |
|
80 | - $return['ActualDamage'] =& $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
79 | + $return['WeaponDamage'] = & $this->getModifiedDamageAgainstPlayer($weaponPlayer, $targetPlayer); |
|
80 | + $return['ActualDamage'] = & $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
81 | 81 | |
82 | 82 | if ($return['ActualDamage']['KillingShot']) { |
83 | - $return['KillResults'] =& $targetPlayer->killPlayerByPlayer($weaponPlayer); |
|
83 | + $return['KillResults'] = & $targetPlayer->killPlayerByPlayer($weaponPlayer); |
|
84 | 84 | } |
85 | 85 | return $return; |
86 | 86 | } |
87 | 87 | |
88 | 88 | protected function &doPlayerDamageToPort(array &$return, AbstractSmrPlayer $weaponPlayer, SmrPort $port) { |
89 | - $return['WeaponDamage'] =& $this->getModifiedDamageAgainstPort($weaponPlayer,$port); |
|
90 | - $return['ActualDamage'] =& $port->doWeaponDamage($return['WeaponDamage']); |
|
89 | + $return['WeaponDamage'] = & $this->getModifiedDamageAgainstPort($weaponPlayer, $port); |
|
90 | + $return['ActualDamage'] = & $port->doWeaponDamage($return['WeaponDamage']); |
|
91 | 91 | if ($return['ActualDamage']['KillingShot']) { |
92 | - $return['KillResults'] =& $port->killPortByPlayer($weaponPlayer); |
|
92 | + $return['KillResults'] = & $port->killPortByPlayer($weaponPlayer); |
|
93 | 93 | } |
94 | 94 | return $return; |
95 | 95 | } |
96 | 96 | |
97 | 97 | protected function &doPlayerDamageToPlanet(array &$return, AbstractSmrPlayer $weaponPlayer, SmrPlanet $planet, $delayed) { |
98 | - $return['WeaponDamage'] =& $this->getModifiedDamageAgainstPlanet($weaponPlayer,$planet); |
|
99 | - $return['ActualDamage'] =& $planet->doWeaponDamage($return['WeaponDamage'],$delayed); |
|
98 | + $return['WeaponDamage'] = & $this->getModifiedDamageAgainstPlanet($weaponPlayer, $planet); |
|
99 | + $return['ActualDamage'] = & $planet->doWeaponDamage($return['WeaponDamage'], $delayed); |
|
100 | 100 | if ($return['ActualDamage']['KillingShot']) { |
101 | - $return['KillResults'] =& $planet->killPlanetByPlayer($weaponPlayer); |
|
101 | + $return['KillResults'] = & $planet->killPlanetByPlayer($weaponPlayer); |
|
102 | 102 | } |
103 | 103 | return $return; |
104 | 104 | } |
105 | 105 | |
106 | 106 | protected function &doPortDamageToPlayer(array &$return, SmrPort $port, AbstractSmrPlayer $targetPlayer) { |
107 | - $return['WeaponDamage'] =& $this->getModifiedPortDamageAgainstPlayer($port,$targetPlayer); |
|
108 | - $return['ActualDamage'] =& $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
107 | + $return['WeaponDamage'] = & $this->getModifiedPortDamageAgainstPlayer($port, $targetPlayer); |
|
108 | + $return['ActualDamage'] = & $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
109 | 109 | |
110 | 110 | if ($return['ActualDamage']['KillingShot']) { |
111 | - $return['KillResults'] =& $targetPlayer->killPlayerByPort($port); |
|
111 | + $return['KillResults'] = & $targetPlayer->killPlayerByPort($port); |
|
112 | 112 | } |
113 | 113 | return $return; |
114 | 114 | } |
115 | 115 | |
116 | 116 | protected function &doPlanetDamageToPlayer(array &$return, SmrPlanet $planet, AbstractSmrPlayer $targetPlayer) { |
117 | - $return['WeaponDamage'] =& $this->getModifiedPlanetDamageAgainstPlayer($planet,$targetPlayer); |
|
118 | - $return['ActualDamage'] =& $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
117 | + $return['WeaponDamage'] = & $this->getModifiedPlanetDamageAgainstPlayer($planet, $targetPlayer); |
|
118 | + $return['ActualDamage'] = & $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
119 | 119 | |
120 | 120 | if ($return['ActualDamage']['KillingShot']) { |
121 | - $return['KillResults'] =& $targetPlayer->killPlayerByPlanet($planet); |
|
121 | + $return['KillResults'] = & $targetPlayer->killPlayerByPlanet($planet); |
|
122 | 122 | } |
123 | 123 | return $return; |
124 | 124 | } |
125 | 125 | |
126 | 126 | protected function &doForceDamageToPlayer(array &$return, SmrForce $forces, AbstractSmrPlayer $targetPlayer) { |
127 | - $return['WeaponDamage'] =& $this->getModifiedForceDamageAgainstPlayer($forces,$targetPlayer); |
|
128 | - $return['ActualDamage'] =& $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
127 | + $return['WeaponDamage'] = & $this->getModifiedForceDamageAgainstPlayer($forces, $targetPlayer); |
|
128 | + $return['ActualDamage'] = & $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
129 | 129 | |
130 | 130 | if ($return['ActualDamage']['KillingShot']) { |
131 | - $return['KillResults'] =& $targetPlayer->killPlayerByForces($forces); |
|
131 | + $return['KillResults'] = & $targetPlayer->killPlayerByForces($forces); |
|
132 | 132 | } |
133 | 133 | return $return; |
134 | 134 | } |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | } |
235 | 235 | |
236 | 236 | public static function getLetterForPiece(int $pieceID, string $colour) : string { |
237 | - $letter = match ($pieceID) { |
|
237 | + $letter = match($pieceID) { |
|
238 | 238 | self::KING => 'k', |
239 | 239 | self::QUEEN => 'q', |
240 | 240 | self::ROOK => 'r', |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | } |
250 | 250 | |
251 | 251 | public static function getPieceForLetter(string $letter) : int { |
252 | - return match (strtolower($letter)) { |
|
252 | + return match(strtolower($letter)) { |
|
253 | 253 | 'k' => self::KING, |
254 | 254 | 'q' => self::QUEEN, |
255 | 255 | 'r' => self::ROOK, |
@@ -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 | } |
@@ -1125,7 +1125,7 @@ discard block |
||
1125 | 1125 | } |
1126 | 1126 | } |
1127 | 1127 | |
1128 | - public function addPoints(int $numPoints, SmrAccount $admin, int $reasonID, string $suspicion) : int | false { |
|
1128 | + public function addPoints(int $numPoints, SmrAccount $admin, int $reasonID, string $suspicion) : int|false { |
|
1129 | 1129 | //do we have points |
1130 | 1130 | $this->setPoints($this->getPoints() + $numPoints, SmrSession::getTime()); |
1131 | 1131 | $totalPoints = $this->getPoints(); |