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

Completed
Push — master ( 42cc88...1adc02 )
by Dan
19s queued 16s
created
lib/Default/SmrScoutDrones.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
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']);
Please login to merge, or discard this patch.
lib/Default/SmrPlayer.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	/**
208 208
 	 * Insert a new player into the database. Returns the new player object.
209 209
 	 */
210
-	public static function createPlayer($accountID, $gameID, $playerName, $raceID, $isNewbie, $npc=false) {
210
+	public static function createPlayer($accountID, $gameID, $playerName, $raceID, $isNewbie, $npc = false) {
211 211
 		// Put the player in a sector with an HQ
212 212
 		$startSectorID = self::getHome($gameID, $raceID);
213 213
 
@@ -1163,13 +1163,13 @@  discard block
 block discarded – undo
1163 1163
 			$this->db->query('SELECT type,amount FROM player_hof WHERE ' . $this->SQL);
1164 1164
 			$this->HOF = array();
1165 1165
 			while ($this->db->nextRecord()) {
1166
-				$hof =& $this->HOF;
1166
+				$hof = & $this->HOF;
1167 1167
 				$typeList = explode(':', $this->db->getField('type'));
1168 1168
 				foreach ($typeList as $type) {
1169 1169
 					if (!isset($hof[$type])) {
1170 1170
 						$hof[$type] = array();
1171 1171
 					}
1172
-					$hof =& $hof[$type];
1172
+					$hof = & $hof[$type];
1173 1173
 				}
1174 1174
 				$hof = $this->db->getFloat('amount');
1175 1175
 			}
@@ -1611,7 +1611,7 @@  discard block
 block discarded – undo
1611 1611
 			create_error('The saved sector must be in the box!');
1612 1612
 		}
1613 1613
 
1614
-		$storedDestinations =& $this->getStoredDestinations();
1614
+		$storedDestinations = & $this->getStoredDestinations();
1615 1615
 		foreach ($storedDestinations as &$sd) {
1616 1616
 			if ($sd['SectorID'] == $sectorID) {
1617 1617
 				$sd['OffsetTop'] = $offsetTop;
Please login to merge, or discard this patch.
lib/Default/AbstractSmrShip.class.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 	public function setWeaponLocations(array $orderArray) {
302 302
 		$weapons = $this->weapons;
303 303
 		foreach ($orderArray as $newOrder => $oldOrder) {
304
-			$this->weapons[$newOrder] =& $weapons[$oldOrder];
304
+			$this->weapons[$newOrder] = & $weapons[$oldOrder];
305 305
 		}
306 306
 		$this->hasChangedWeapons = true;
307 307
 	}
@@ -901,14 +901,14 @@  discard block
 block discarded – undo
901 901
 		}
902 902
 		$results['DeadBeforeShot'] = false;
903 903
 		foreach ($this->weapons as $orderID => $weapon) {
904
-			$results['Weapons'][$orderID] =& $weapon->shootPlayer($thisPlayer, $targetPlayers[array_rand($targetPlayers)]);
904
+			$results['Weapons'][$orderID] = & $weapon->shootPlayer($thisPlayer, $targetPlayers[array_rand($targetPlayers)]);
905 905
 			if ($results['Weapons'][$orderID]['Hit']) {
906 906
 				$results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage'];
907 907
 			}
908 908
 		}
909 909
 		if ($this->hasCDs()) {
910 910
 			$thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs());
911
-			$results['Drones'] =& $thisCDs->shootPlayer($thisPlayer, $targetPlayers[array_rand($targetPlayers)]);
911
+			$results['Drones'] = & $thisCDs->shootPlayer($thisPlayer, $targetPlayers[array_rand($targetPlayers)]);
912 912
 			$results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage'];
913 913
 		}
914 914
 		$thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PLAYER));
@@ -926,7 +926,7 @@  discard block
 block discarded – undo
926 926
 		}
927 927
 		$results['DeadBeforeShot'] = false;
928 928
 		foreach ($this->weapons as $orderID => $weapon) {
929
-			$results['Weapons'][$orderID] =& $weapon->shootForces($thisPlayer, $forces);
929
+			$results['Weapons'][$orderID] = & $weapon->shootForces($thisPlayer, $forces);
930 930
 			if ($results['Weapons'][$orderID]['Hit']) {
931 931
 				$results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage'];
932 932
 				$thisPlayer->increaseHOF($results['Weapons'][$orderID]['ActualDamage']['NumMines'], array('Combat', 'Forces', 'Mines', 'Killed'), HOF_PUBLIC);
@@ -940,7 +940,7 @@  discard block
 block discarded – undo
940 940
 		}
941 941
 		if ($this->hasCDs()) {
942 942
 			$thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs());
943
-			$results['Drones'] =& $thisCDs->shootForces($thisPlayer, $forces);
943
+			$results['Drones'] = & $thisCDs->shootForces($thisPlayer, $forces);
944 944
 			$results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage'];
945 945
 			$thisPlayer->increaseHOF($results['Drones']['ActualDamage']['NumMines'], array('Combat', 'Forces', 'Mines', 'Killed'), HOF_PUBLIC);
946 946
 			$thisPlayer->increaseHOF($results['Drones']['ActualDamage']['Mines'], array('Combat', 'Forces', 'Mines', 'Damage Done'), HOF_PUBLIC);
@@ -965,14 +965,14 @@  discard block
 block discarded – undo
965 965
 		}
966 966
 		$results['DeadBeforeShot'] = false;
967 967
 		foreach ($this->weapons as $orderID => $weapon) {
968
-			$results['Weapons'][$orderID] =& $weapon->shootPort($thisPlayer, $port);
968
+			$results['Weapons'][$orderID] = & $weapon->shootPort($thisPlayer, $port);
969 969
 			if ($results['Weapons'][$orderID]['Hit']) {
970 970
 				$results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage'];
971 971
 			}
972 972
 		}
973 973
 		if ($this->hasCDs()) {
974 974
 			$thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs());
975
-			$results['Drones'] =& $thisCDs->shootPort($thisPlayer, $port);
975
+			$results['Drones'] = & $thisCDs->shootPort($thisPlayer, $port);
976 976
 			$results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage'];
977 977
 		}
978 978
 		$thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PORT));
@@ -1003,14 +1003,14 @@  discard block
 block discarded – undo
1003 1003
 		}
1004 1004
 		$results['DeadBeforeShot'] = false;
1005 1005
 		foreach ($this->weapons as $orderID => $weapon) {
1006
-			$results['Weapons'][$orderID] =& $weapon->shootPlanet($thisPlayer, $planet, $delayed);
1006
+			$results['Weapons'][$orderID] = & $weapon->shootPlanet($thisPlayer, $planet, $delayed);
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->shootPlanet($thisPlayer, $planet, $delayed);
1013
+			$results['Drones'] = & $thisCDs->shootPlanet($thisPlayer, $planet, $delayed);
1014 1014
 			$results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage'];
1015 1015
 		}
1016 1016
 		$thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PLANET));
Please login to merge, or discard this patch.
lib/Default/AbstractSmrPlayer.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -929,8 +929,8 @@  discard block
 block discarded – undo
929 929
 		}
930 930
 		self::$HOFVis[$hofType] = $visibility;
931 931
 
932
-		$hof =& $this->HOF;
933
-		$hofChanged =& $this->hasHOFChanged;
932
+		$hof = & $this->HOF;
933
+		$hofChanged = & $this->hasHOFChanged;
934 934
 		$new = false;
935 935
 		foreach ($typeList as $type) {
936 936
 			if (!isset($hofChanged[$type])) {
@@ -940,8 +940,8 @@  discard block
 block discarded – undo
940 940
 				$hof[$type] = array();
941 941
 				$new = true;
942 942
 			}
943
-			$hof =& $hof[$type];
944
-			$hofChanged =& $hofChanged[$type];
943
+			$hof = & $hof[$type];
944
+			$hofChanged = & $hofChanged[$type];
945 945
 		}
946 946
 		if ($hofChanged == null) {
947 947
 			$hofChanged = self::HOF_CHANGED;
@@ -1097,7 +1097,7 @@  discard block
 block discarded – undo
1097 1097
 	}
1098 1098
 
1099 1099
 	private function setupMissionStep($missionID) {
1100
-		$mission =& $this->missions[$missionID];
1100
+		$mission = & $this->missions[$missionID];
1101 1101
 		if ($mission['On Step'] >= count(MISSIONS[$missionID]['Steps'])) {
1102 1102
 			// Nothing to do if this mission is already completed
1103 1103
 			return;
@@ -1142,7 +1142,7 @@  discard block
 block discarded – undo
1142 1142
 			'Starting Sector' => $this->getSectorID()
1143 1143
 		);
1144 1144
 
1145
-		$this->missions[$missionID] =& $mission;
1145
+		$this->missions[$missionID] = & $mission;
1146 1146
 		$this->setupMissionStep($missionID);
1147 1147
 		$this->rebuildMission($missionID);
1148 1148
 
@@ -1201,7 +1201,7 @@  discard block
 block discarded – undo
1201 1201
 
1202 1202
 	public function claimMissionReward($missionID) {
1203 1203
 		$this->getMissions();
1204
-		$mission =& $this->missions[$missionID];
1204
+		$mission = & $this->missions[$missionID];
1205 1205
 		if ($mission === false) {
1206 1206
 			throw new Exception('Unknown mission: ' . $missionID);
1207 1207
 		}
Please login to merge, or discard this patch.
lib/Default/AbstractSmrAccount.class.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -363,26 +363,26 @@
 block discarded – undo
363 363
 	}
364 364
 
365 365
 	public function isNPC() {
366
-		if(!isset($this->npc)) {
367
-			$this->db->query('SELECT login FROM npc_logins WHERE login = '.$this->db->escapeString($this->getLogin()).' LIMIT 1;');
366
+		if (!isset($this->npc)) {
367
+			$this->db->query('SELECT login FROM npc_logins WHERE login = ' . $this->db->escapeString($this->getLogin()) . ' LIMIT 1;');
368 368
 			$this->npc = $this->db->nextRecord();
369 369
 		}
370 370
 		return $this->npc;
371 371
 	}
372 372
 
373 373
 	protected function getHOFData() {
374
-		if(!isset($this->HOF)) {
374
+		if (!isset($this->HOF)) {
375 375
 			//Get Player HOF
376 376
 			$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');
377 377
 			$this->HOF = array();
378
-			while($this->db->nextRecord()) {
379
-				$hof =& $this->HOF;
380
-				$typeList = explode(':',$this->db->getField('type'));
381
-				foreach($typeList as $type) {
382
-					if(!isset($hof[$type])) {
378
+			while ($this->db->nextRecord()) {
379
+				$hof = & $this->HOF;
380
+				$typeList = explode(':', $this->db->getField('type'));
381
+				foreach ($typeList as $type) {
382
+					if (!isset($hof[$type])) {
383 383
 						$hof[$type] = array();
384 384
 					}
385
-					$hof =& $hof[$type];
385
+					$hof = & $hof[$type];
386 386
 				}
387 387
 				$hof = $this->db->getFloat('amount');
388 388
 			}
Please login to merge, or discard this patch.
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.
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.
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.
templates/Default/engine/Default/includes/PortCombatResults.inc 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@  discard block
 block discarded – undo
1 1
 <?php
2
-$CombatPort =& $PortCombatResults['Port'];
2
+$CombatPort = & $PortCombatResults['Port'];
3 3
 $TotalDamage = $PortCombatResults['TotalDamage'];
4
-if($MinimalDisplay) {
4
+if ($MinimalDisplay) {
5 5
 	echo $CombatPort->getDisplayName();
6
-	if($TotalDamage > 0) {
6
+	if ($TotalDamage > 0) {
7 7
 		?> hit for a total of <span class="red"><?php echo $TotalDamage ?></span> damage in this round of combat of which <span class="red"><?php echo $PortCombatResults['TotalDamagePerTargetPlayer'][$ThisPlayer->getAccountID()]; ?></span> was done to you<?php
8 8
 	} else {
9 9
 		?> does no damage this round<?php
10 10
 	} ?>. <?php echo $AttackLogLink;
11 11
 	return;
12 12
 }
13
-if(isset($PortCombatResults['Weapons']) && is_array($PortCombatResults['Weapons'])) {
14
-	foreach($PortCombatResults['Weapons'] as $WeaponResults) {
15
-		$ShootingWeapon =& $WeaponResults['Weapon'];
16
-		$ShotHit =& $WeaponResults['Hit'];
17
-		$ActualDamage =& $WeaponResults['ActualDamage'];
18
-		$WeaponDamage =& $WeaponResults['WeaponDamage'];
19
-		$TargetPlayer =& $WeaponResults['TargetPlayer'];
13
+if (isset($PortCombatResults['Weapons']) && is_array($PortCombatResults['Weapons'])) {
14
+	foreach ($PortCombatResults['Weapons'] as $WeaponResults) {
15
+		$ShootingWeapon = & $WeaponResults['Weapon'];
16
+		$ShotHit = & $WeaponResults['Hit'];
17
+		$ActualDamage = & $WeaponResults['ActualDamage'];
18
+		$WeaponDamage = & $WeaponResults['WeaponDamage'];
19
+		$TargetPlayer = & $WeaponResults['TargetPlayer'];
20 20
 		
21
-		echo $CombatPort->getDisplayName() ?> fires an <?php echo $ShootingWeapon->getName() ?> at <?php if($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?> the debris that was once <?php } echo $TargetPlayer->getDisplayName();
21
+		echo $CombatPort->getDisplayName() ?> fires an <?php echo $ShootingWeapon->getName() ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?> the debris that was once <?php } echo $TargetPlayer->getDisplayName();
22 22
 		if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) {
23
-			if(!$ShotHit) {
23
+			if (!$ShotHit) {
24 24
 				?> and misses<?php
25
-			} else if($ActualDamage['TotalDamage'] == 0) {
26
-				if($WeaponDamage['Shield'] > 0) {
27
-					if($ActualDamage['HasCDs']) {
25
+			} else if ($ActualDamage['TotalDamage'] == 0) {
26
+				if ($WeaponDamage['Shield'] > 0) {
27
+					if ($ActualDamage['HasCDs']) {
28 28
 						?> which proves ineffective against their combat drones<?php
29 29
 					} else {
30 30
 						?> which washes harmlessly over their hull<?php
31 31
 					}
32
-				} else if($WeaponDamage['Armour'] > 0) {
32
+				} else if ($WeaponDamage['Armour'] > 0) {
33 33
 					?> which is deflected by their shields<?php
34 34
 				} else {
35 35
 					?> but it cannot do any damage<?php
@@ -37,49 +37,49 @@  discard block
 block discarded – undo
37 37
 			} else {
38 38
 				?> destroying <?php
39 39
 				$DamageTypes = 0;
40
-				if($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
41
-				if($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
42
-				if($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
40
+				if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
41
+				if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
42
+				if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
43 43
 
44
-				if($ActualDamage['Shield'] > 0) {
44
+				if ($ActualDamage['Shield'] > 0) {
45 45
 					?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php
46 46
 					$this->doDamageTypeReductionDisplay($DamageTypes);
47 47
 				}
48
-				if($ActualDamage['NumCDs'] > 0) {
48
+				if ($ActualDamage['NumCDs'] > 0) {
49 49
 					?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']) ?></span> combat drones<?php
50 50
 					$this->doDamageTypeReductionDisplay($DamageTypes);
51 51
 				}
52
-				if($ActualDamage['Armour'] > 0) {
52
+				if ($ActualDamage['Armour'] > 0) {
53 53
 					?><span class="red"><?php echo number_format($ActualDamage['Armour']) ?></span> plates of armour<?php
54 54
 				}
55 55
 			}
56 56
 		} ?>.
57 57
 		<br /><?php
58 58
 		if ($ShotHit && $ActualDamage['KillingShot']) {
59
-			$this->includeTemplate('includes/TraderCombatKillMessage.inc',array('KillResults'=>$WeaponResults['KillResults'],'TargetPlayer'=>$TargetPlayer));
59
+			$this->includeTemplate('includes/TraderCombatKillMessage.inc', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPlayer'=>$TargetPlayer));
60 60
 		}
61 61
 	}
62 62
 }
63
-if(isset($PortCombatResults['Drones'])) {
64
-	$Drones =& $PortCombatResults['Drones'];
65
-	$ActualDamage =& $Drones['ActualDamage'];
66
-	$WeaponDamage =& $Drones['WeaponDamage'];
67
-	$TargetPlayer =& $Drones['TargetPlayer'];
63
+if (isset($PortCombatResults['Drones'])) {
64
+	$Drones = & $PortCombatResults['Drones'];
65
+	$ActualDamage = & $Drones['ActualDamage'];
66
+	$WeaponDamage = & $Drones['WeaponDamage'];
67
+	$TargetPlayer = & $Drones['TargetPlayer'];
68 68
 	
69 69
 	echo $CombatPort->getDisplayName();
70
-	if($WeaponDamage['Launched'] == 0) {
70
+	if ($WeaponDamage['Launched'] == 0) {
71 71
 		?> fails to launch it's combat drones<?php
72 72
 	} else {
73
-		?> launches <span class="cds"><?php echo $WeaponDamage['Launched'] ?></span> combat drones at <?php if($ActualDamage['TargetAlreadyDead']){ ?>the debris that was once <?php } echo $TargetPlayer->getDisplayName();
74
-		if(!$ActualDamage['TargetAlreadyDead']) {
75
-			if($ActualDamage['TotalDamage'] == 0) {
76
-				if($WeaponDamage['Shield'] > 0) {
77
-					if($ActualDamage['HasCDs']) {
73
+		?> launches <span class="cds"><?php echo $WeaponDamage['Launched'] ?></span> combat drones at <?php if ($ActualDamage['TargetAlreadyDead']) { ?>the debris that was once <?php } echo $TargetPlayer->getDisplayName();
74
+		if (!$ActualDamage['TargetAlreadyDead']) {
75
+			if ($ActualDamage['TotalDamage'] == 0) {
76
+				if ($WeaponDamage['Shield'] > 0) {
77
+					if ($ActualDamage['HasCDs']) {
78 78
 						?> which prove ineffective against their combat drones<?php
79 79
 					} else {
80 80
 						?> which washes harmlessly over their hull<?php
81 81
 					}
82
-				} else if($WeaponDamage['Armour'] > 0) {
82
+				} else if ($WeaponDamage['Armour'] > 0) {
83 83
 					?> which is deflected by their shields<?php
84 84
 				} else {
85 85
 					?> but they cannot do any damage<?php
Please login to merge, or discard this patch.