Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Push — master ( 05708e...0d7dc4 )
by Dan
04:00
created
src/tools/discord/GameLink.inc 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,10 +3,10 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/tools/npc/chess.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -10,22 +10,22 @@  discard block
 block discarded – undo
10 10
 
11 11
 	debug('Script started');
12 12
 	define('SCRIPT_ID', $db->getInsertID());
13
-	$db->query('UPDATE npc_logs SET script_id='.SCRIPT_ID.' WHERE log_id='.SCRIPT_ID);
13
+	$db->query('UPDATE npc_logs SET script_id=' . SCRIPT_ID . ' WHERE log_id=' . SCRIPT_ID);
14 14
 
15 15
 	define('NPC_SCRIPT', true);
16 16
 
17 17
 	$descriptorSpec = array(
18
-		0 => array("pipe", "r"),  // stdin is a pipe that the child will read from
18
+		0 => array("pipe", "r"), // stdin is a pipe that the child will read from
19 19
 		1 => array("pipe", "w")  // stdout is a pipe that the child will write to
20 20
 	);
21 21
 	$engine = proc_open(UCI_CHESS_ENGINE, $descriptorSpec, $pipes);
22
-	$toEngine =& $pipes[0];
23
-	$fromEngine =& $pipes[1];
22
+	$toEngine = & $pipes[0];
23
+	$fromEngine = & $pipes[1];
24 24
 
25 25
 	function readFromEngine($block = true) {
26 26
 		global $fromEngine;
27 27
 		stream_set_blocking($fromEngine, $block == true ? 1 : 0);
28
-		while(($s = fgets($fromEngine)) !== false) {
28
+		while (($s = fgets($fromEngine)) !== false) {
29 29
 			debug('<-- ' . trim($s));
30 30
 			stream_set_blocking($fromEngine, 0);
31 31
 		}
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 		global $toEngine;
35 35
 		debug('--> ' . $s);
36 36
 		fputs($toEngine, $s . EOL);
37
-		if($read === true) {
37
+		if ($read === true) {
38 38
 			readFromEngine($block);
39 39
 		}
40 40
 	}
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	writeToEngine('isready');
46 46
 	writeToEngine('ucinewgame', false);
47 47
 
48
-	while(true) {
48
+	while (true) {
49 49
 		// The next "page request" must occur at an updated time.
50 50
 		SmrSession::updateTime();
51 51
 
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 			writeToEngine('position fen ' . $chessGame->getFENString(), false);
55 55
 			writeToEngine('go ' . ($chessGame->getCurrentTurnColour() == ChessGame::PLAYER_WHITE ? 'w' : 'b') . 'time ' . UCI_TIME_PER_MOVE_MS, true, false);
56 56
 			stream_set_blocking($fromEngine, 1);
57
-			while(stripos($move = trim(fgets($fromEngine)), 'bestmove') !== 0) {
57
+			while (stripos($move = trim(fgets($fromEngine)), 'bestmove') !== 0) {
58 58
 				debug('<-- ' . $move);
59
-				if(stripos($move, 'Seg') === 0) {
59
+				if (stripos($move, 'Seg') === 0) {
60 60
 					// Segfault
61 61
 					debug('UCI engine segfaulted?');
62 62
 					exit;
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
 	fclose($toEngine);
77 77
 	fclose($fromEngine);
78 78
 	proc_close($engine);
79
-} catch(Throwable $e) {
79
+} catch (Throwable $e) {
80 80
 	logException($e);
81 81
 	exit;
82 82
 }
83 83
 function debug($message, $debugObject = null) {
84
-	global $account,$var,$db;
85
-	echo date('Y-m-d H:i:s - ').$message.($debugObject!==null?EOL.var_export($debugObject,true):'').EOL;
86
-	$db->query('INSERT INTO npc_logs (script_id, npc_id, time, message, debug_info, var) VALUES ('.(defined('SCRIPT_ID')?SCRIPT_ID:0).', '.(is_object($account)?$account->getAccountID():0).',NOW(),'.$db->escapeString($message).','.$db->escapeString(var_export($debugObject,true)).','.$db->escapeString(var_export($var,true)).')');
84
+	global $account, $var, $db;
85
+	echo date('Y-m-d H:i:s - ') . $message . ($debugObject !== null ?EOL.var_export($debugObject, true) : '') . EOL;
86
+	$db->query('INSERT INTO npc_logs (script_id, npc_id, time, message, debug_info, var) VALUES (' . (defined('SCRIPT_ID') ?SCRIPT_ID:0) . ', ' . (is_object($account) ? $account->getAccountID() : 0) . ',NOW(),' . $db->escapeString($message) . ',' . $db->escapeString(var_export($debugObject, true)) . ',' . $db->escapeString(var_export($var, true)) . ')');
87 87
 }
Please login to merge, or discard this patch.
src/tools/npc/npc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 		}
120 120
 
121 121
 		try {
122
-			$TRADE_ROUTE =& $GLOBALS['TRADE_ROUTE'];
122
+			$TRADE_ROUTE = & $GLOBALS['TRADE_ROUTE'];
123 123
 			debug('Action #' . $actions);
124 124
 
125 125
 			//We have to reload player on each loop
@@ -138,14 +138,14 @@  discard block
 block discarded – undo
138 138
 			}
139 139
 
140 140
 			if (!isset($TRADE_ROUTE)) { //We only want to change trade route if there isn't already one set.
141
-				$TRADE_ROUTES =& findRoutes($player);
142
-				$TRADE_ROUTE =& changeRoute($TRADE_ROUTES);
141
+				$TRADE_ROUTES = & findRoutes($player);
142
+				$TRADE_ROUTE = & changeRoute($TRADE_ROUTES);
143 143
 			}
144 144
 
145 145
 			if ($player->isDead()) {
146 146
 				debug('Some evil person killed us, let\'s move on now.');
147 147
 				$previousContainer = null; //We died, we don't care what we were doing beforehand.
148
-				$TRADE_ROUTE =& changeRoute($TRADE_ROUTES); //Change route
148
+				$TRADE_ROUTE = & changeRoute($TRADE_ROUTES); //Change route
149 149
 				processContainer(create_container('death_processing.php'));
150 150
 			}
151 151
 			if ($player->getNewbieTurns() <= NEWBIE_TURNS_WARNING_LIMIT && $player->getNewbieWarning()) {
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 								processContainer(tradeGoods($goodID, $player, $port));
228 228
 							} else {
229 229
 								//Move to next route or fed.
230
-								if (($TRADE_ROUTE =& changeRoute($TRADE_ROUTES)) === false) {
230
+								if (($TRADE_ROUTE = & changeRoute($TRADE_ROUTES)) === false) {
231 231
 									debug('Changing Route Failed');
232 232
 									processContainer(plotToFed($player));
233 233
 								} else {
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 							processContainer(tradeGoods($goodID, $player, $port));
255 255
 						} else {
256 256
 							//Move to next route or fed.
257
-							if (($TRADE_ROUTE =& changeRoute($TRADE_ROUTES)) === false) {
257
+							if (($TRADE_ROUTE = & changeRoute($TRADE_ROUTES)) === false) {
258 258
 								debug('Changing Route Failed');
259 259
 								processContainer(plotToFed($player));
260 260
 							} else {
@@ -586,9 +586,9 @@  discard block
 block discarded – undo
586 586
 		return $false;
587 587
 	}
588 588
 	$routeKey = array_rand($tradeRoutes);
589
-	$tradeRoute =& $tradeRoutes[$routeKey];
589
+	$tradeRoute = & $tradeRoutes[$routeKey];
590 590
 	unset($tradeRoutes[$routeKey]);
591
-	$GLOBALS['TRADE_ROUTE'] =& $tradeRoute;
591
+	$GLOBALS['TRADE_ROUTE'] = & $tradeRoute;
592 592
 	debug('Switched route', $tradeRoute);
593 593
 	return $tradeRoute;
594 594
 }
Please login to merge, or discard this patch.
src/tools/chat_helpers/channel_msg_op_turns.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 			continue;
25 25
 		}
26 26
 		$turns = min($attendeePlayer->getTurns() + $attendeePlayer->getTurnsGained(time(), true),
27
-		             $attendeePlayer->getMaxTurns());
27
+					 $attendeePlayer->getMaxTurns());
28 28
 		$oppers[$attendeePlayer->getPlayerName()] = $turns;
29 29
 	}
30 30
 
Please login to merge, or discard this patch.
src/lib/Default/AbstractSmrPlayer.class.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 		while ($this->db->nextRecord()) {
315 315
 			try {
316 316
 				$otherPlayer = SmrPlayer::getPlayer($this->db->getInt('from_account_id'),
317
-				                                    $this->getGameID(), $forceUpdate);
317
+													$this->getGameID(), $forceUpdate);
318 318
 			} catch (PlayerNotFoundException $e) {
319 319
 				// Skip players that have not joined this game
320 320
 				continue;
@@ -878,9 +878,9 @@  discard block
 block discarded – undo
878 878
 	 */
879 879
 	public function canFight() {
880 880
 		return !($this->hasNewbieTurns() ||
881
-		         $this->isDead() ||
882
-		         $this->isLandedOnPlanet() ||
883
-		         $this->hasFederalProtection());
881
+				 $this->isDead() ||
882
+				 $this->isLandedOnPlanet() ||
883
+				 $this->hasFederalProtection());
884 884
 	}
885 885
 
886 886
 	public function setDead($bool) {
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 	/**
269 269
 	 * Insert a new player into the database. Returns the new player object.
270 270
 	 */
271
-	public static function createPlayer($accountID, $gameID, $playerName, $raceID, $isNewbie, $npc=false) {
271
+	public static function createPlayer($accountID, $gameID, $playerName, $raceID, $isNewbie, $npc = false) {
272 272
 		$db = MySqlDatabase::getInstance();
273 273
 		$db->lockTable('player');
274 274
 
@@ -1703,7 +1703,7 @@  discard block
 block discarded – undo
1703 1703
 			create_error('The saved sector must be in the box!');
1704 1704
 		}
1705 1705
 
1706
-		$storedDestinations =& $this->getStoredDestinations();
1706
+		$storedDestinations = & $this->getStoredDestinations();
1707 1707
 		foreach ($storedDestinations as &$sd) {
1708 1708
 			if ($sd['SectorID'] == $sectorID) {
1709 1709
 				$sd['OffsetTop'] = $offsetTop;
@@ -2030,13 +2030,13 @@  discard block
 block discarded – undo
2030 2030
 			$this->db->query('SELECT type,amount FROM player_hof WHERE ' . $this->SQL);
2031 2031
 			$this->HOF = array();
2032 2032
 			while ($this->db->nextRecord()) {
2033
-				$hof =& $this->HOF;
2033
+				$hof = & $this->HOF;
2034 2034
 				$typeList = explode(':', $this->db->getField('type'));
2035 2035
 				foreach ($typeList as $type) {
2036 2036
 					if (!isset($hof[$type])) {
2037 2037
 						$hof[$type] = array();
2038 2038
 					}
2039
-					$hof =& $hof[$type];
2039
+					$hof = & $hof[$type];
2040 2040
 				}
2041 2041
 				$hof = $this->db->getFloat('amount');
2042 2042
 			}
@@ -2115,8 +2115,8 @@  discard block
 block discarded – undo
2115 2115
 		}
2116 2116
 		self::$HOFVis[$hofType] = $visibility;
2117 2117
 
2118
-		$hof =& $this->HOF;
2119
-		$hofChanged =& $this->hasHOFChanged;
2118
+		$hof = & $this->HOF;
2119
+		$hofChanged = & $this->hasHOFChanged;
2120 2120
 		$new = false;
2121 2121
 		foreach ($typeList as $type) {
2122 2122
 			if (!isset($hofChanged[$type])) {
@@ -2126,8 +2126,8 @@  discard block
 block discarded – undo
2126 2126
 				$hof[$type] = array();
2127 2127
 				$new = true;
2128 2128
 			}
2129
-			$hof =& $hof[$type];
2130
-			$hofChanged =& $hofChanged[$type];
2129
+			$hof = & $hof[$type];
2130
+			$hofChanged = & $hofChanged[$type];
2131 2131
 		}
2132 2132
 		if ($hofChanged == null) {
2133 2133
 			$hofChanged = self::HOF_CHANGED;
@@ -2730,7 +2730,7 @@  discard block
 block discarded – undo
2730 2730
 	}
2731 2731
 
2732 2732
 	private function setupMissionStep($missionID) {
2733
-		$mission =& $this->missions[$missionID];
2733
+		$mission = & $this->missions[$missionID];
2734 2734
 		if ($mission['On Step'] >= count(MISSIONS[$missionID]['Steps'])) {
2735 2735
 			// Nothing to do if this mission is already completed
2736 2736
 			return;
@@ -2779,7 +2779,7 @@  discard block
 block discarded – undo
2779 2779
 			'Starting Sector' => $this->getSectorID()
2780 2780
 		);
2781 2781
 
2782
-		$this->missions[$missionID] =& $mission;
2782
+		$this->missions[$missionID] = & $mission;
2783 2783
 		$this->setupMissionStep($missionID);
2784 2784
 		$this->rebuildMission($missionID);
2785 2785
 
@@ -2829,7 +2829,7 @@  discard block
 block discarded – undo
2829 2829
 
2830 2830
 	public function claimMissionReward($missionID) {
2831 2831
 		$this->getMissions();
2832
-		$mission =& $this->missions[$missionID];
2832
+		$mission = & $this->missions[$missionID];
2833 2833
 		if ($mission === false) {
2834 2834
 			throw new Exception('Unknown mission: ' . $missionID);
2835 2835
 		}
Please login to merge, or discard this patch.
src/lib/Default/SmrWeapon.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 			// If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods.
198 198
 			return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
199 199
 		}
200
-		$damage =& $this->getModifiedDamage();
200
+		$damage = & $this->getModifiedDamage();
201 201
 		return $damage;
202 202
 	}
203 203
 	
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 			// If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods.
207 207
 			return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
208 208
 		}
209
-		$damage =& $this->getModifiedDamage();
209
+		$damage = & $this->getModifiedDamage();
210 210
 		return $damage;
211 211
 	}
212 212
 	
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 			// If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods.
216 216
 			return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
217 217
 		}
218
-		$damage =& $this->getModifiedDamage();
218
+		$damage = & $this->getModifiedDamage();
219 219
 		
220 220
 		$planetMod = self::PLANET_DAMAGE_MOD;
221 221
 		$damage['MaxDamage'] = ICeil($damage['MaxDamage'] * $planetMod);
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 			$return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
236 236
 			return $return;
237 237
 		}
238
-		$damage =& $this->getModifiedDamage();
238
+		$damage = & $this->getModifiedDamage();
239 239
 		return $damage;
240 240
 	}
241 241
 	
Please login to merge, or discard this patch.
src/lib/Default/AbstractSmrAccount.class.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -361,26 +361,26 @@
 block discarded – undo
361 361
 	}
362 362
 
363 363
 	public function isNPC() : bool {
364
-		if(!isset($this->npc)) {
365
-			$this->db->query('SELECT login FROM npc_logins WHERE login = '.$this->db->escapeString($this->getLogin()).' LIMIT 1;');
364
+		if (!isset($this->npc)) {
365
+			$this->db->query('SELECT login FROM npc_logins WHERE login = ' . $this->db->escapeString($this->getLogin()) . ' LIMIT 1;');
366 366
 			$this->npc = $this->db->nextRecord();
367 367
 		}
368 368
 		return $this->npc;
369 369
 	}
370 370
 
371 371
 	protected function getHOFData() : void {
372
-		if(!isset($this->HOF)) {
372
+		if (!isset($this->HOF)) {
373 373
 			//Get Player HOF
374 374
 			$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');
375 375
 			$this->HOF = array();
376
-			while($this->db->nextRecord()) {
377
-				$hof =& $this->HOF;
378
-				$typeList = explode(':',$this->db->getField('type'));
379
-				foreach($typeList as $type) {
380
-					if(!isset($hof[$type])) {
376
+			while ($this->db->nextRecord()) {
377
+				$hof = & $this->HOF;
378
+				$typeList = explode(':', $this->db->getField('type'));
379
+				foreach ($typeList as $type) {
380
+					if (!isset($hof[$type])) {
381 381
 						$hof[$type] = array();
382 382
 					}
383
-					$hof =& $hof[$type];
383
+					$hof = & $hof[$type];
384 384
 				}
385 385
 				$hof = $this->db->getFloat('amount');
386 386
 			}
Please login to merge, or discard this patch.
src/lib/Default/Blackjack/Card.class.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/lib/Default/SmrCombatDrones.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 			// If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods.
133 133
 			return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
134 134
 		}
135
-		$damage =& $this->getModifiedDamage();
135
+		$damage = & $this->getModifiedDamage();
136 136
 		$damage['Launched'] = ICeil($this->getNumberOfCDs() * $this->getModifiedAccuracyAgainstForces($weaponPlayer, $forces) / 100);
137 137
 		$damage['Kamikaze'] = 0;
138 138
 		if ($weaponPlayer->isCombatDronesKamikazeOnMines()) { // If kamikaze then damage is same as MINE_ARMOUR
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 			// If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods.
157 157
 			return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
158 158
 		}
159
-		$damage =& $this->getModifiedDamage();
159
+		$damage = & $this->getModifiedDamage();
160 160
 		$damage['Launched'] = ICeil($this->getNumberOfCDs() * $this->getModifiedAccuracyAgainstPort($weaponPlayer, $port) / 100);
161 161
 		$damage['MaxDamage'] = ICeil($damage['Launched'] * $damage['MaxDamage']);
162 162
 		$damage['Shield'] = ICeil($damage['Launched'] * $damage['Shield']);
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 			// If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods.
171 171
 			return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
172 172
 		}
173
-		$damage =& $this->getModifiedDamage();
173
+		$damage = & $this->getModifiedDamage();
174 174
 		$damage['Launched'] = ICeil($this->getNumberOfCDs() * $this->getModifiedAccuracyAgainstPlanet($weaponPlayer, $planet) / 100);
175 175
 		$planetMod = self::PLANET_DAMAGE_MOD;
176 176
 		$damage['MaxDamage'] = ICeil($damage['Launched'] * $damage['MaxDamage'] * $planetMod);
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 			$return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
186 186
 			return $return;
187 187
 		}
188
-		$damage =& $this->getModifiedDamage();
188
+		$damage = & $this->getModifiedDamage();
189 189
 		if ($targetPlayer->getShip()->hasDCS()) {
190 190
 			$damage['MaxDamage'] *= DCS_PLAYER_DAMAGE_DECIMAL_PERCENT;
191 191
 			$damage['Shield'] *= DCS_PLAYER_DAMAGE_DECIMAL_PERCENT;
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 			$return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
204 204
 			return $return;
205 205
 		}
206
-		$damage =& $this->getModifiedDamage();
206
+		$damage = & $this->getModifiedDamage();
207 207
 		
208 208
 		if ($targetPlayer->getShip()->hasDCS()) {
209 209
 			$damage['MaxDamage'] *= DCS_FORCE_DAMAGE_DECIMAL_PERCENT;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 			$return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
224 224
 			return $return;
225 225
 		}
226
-		$damage =& $this->getModifiedDamage();
226
+		$damage = & $this->getModifiedDamage();
227 227
 		
228 228
 		if ($targetPlayer->getShip()->hasDCS()) {
229 229
 			$damage['MaxDamage'] *= DCS_PORT_DAMAGE_DECIMAL_PERCENT;
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 			$return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
243 243
 			return $return;
244 244
 		}
245
-		$damage =& $this->getModifiedDamage();
245
+		$damage = & $this->getModifiedDamage();
246 246
 		
247 247
 		if ($targetPlayer->getShip()->hasDCS()) {
248 248
 			$damage['MaxDamage'] *= DCS_PLANET_DAMAGE_DECIMAL_PERCENT;
Please login to merge, or discard this patch.