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 ( 9fc47f...05708e )
by Dan
04:48
created
lib/Default/SmrPlanetType.class.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/Default/AbstractSmrPort.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1180,7 +1180,7 @@  discard block
 block discarded – undo
1180 1180
 			do {
1181 1181
 				$targetPlayer = $targetPlayers[array_rand($targetPlayers)];
1182 1182
 			} while ($results['TotalShotsPerTargetPlayer'][$targetPlayer->getAccountID()] > min($results['TotalShotsPerTargetPlayer']));
1183
-			$results['Weapons'][$orderID] =& $weapon->shootPlayerAsPort($this, $targetPlayer);
1183
+			$results['Weapons'][$orderID] = & $weapon->shootPlayerAsPort($this, $targetPlayer);
1184 1184
 			$results['TotalShotsPerTargetPlayer'][$targetPlayer->getAccountID()]++;
1185 1185
 			if ($results['Weapons'][$orderID]['Hit']) {
1186 1186
 				$results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage'];
@@ -1189,7 +1189,7 @@  discard block
 block discarded – undo
1189 1189
 		}
1190 1190
 		if ($this->hasCDs()) {
1191 1191
 			$thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs(), true);
1192
-			$results['Drones'] =& $thisCDs->shootPlayerAsPort($this, $targetPlayers[array_rand($targetPlayers)]);
1192
+			$results['Drones'] = & $thisCDs->shootPlayerAsPort($this, $targetPlayers[array_rand($targetPlayers)]);
1193 1193
 			$results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage'];
1194 1194
 			$results['TotalDamagePerTargetPlayer'][$results['Drones']['TargetPlayer']->getAccountID()] += $results['Drones']['ActualDamage']['TotalDamage'];
1195 1195
 		}
Please login to merge, or discard this patch.
lib/Default/SmrPlanet.class.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -707,7 +707,7 @@
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1146,7 +1146,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
lib/Default/DummyPlayer.class.php 2 patches
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,9 @@  discard block
 block discarded – undo
53 53
 	}
54 54
 	
55 55
 	public function setAllianceID($ID) {
56
-		if($this->allianceID == $ID)
57
-			return;
56
+		if($this->allianceID == $ID) {
57
+					return;
58
+		}
58 59
 		$this->allianceID=$ID;
59 60
 	}
60 61
 	
@@ -93,8 +94,7 @@  discard block
 block discarded – undo
93 94
 		if($db->nextRecord()) {
94 95
 			$return = unserialize($db->getField('info'));
95 96
 			return $return;
96
-		}
97
-		else {
97
+		} else {
98 98
 			$return = new DummyPlayer();
99 99
 			return $return;
100 100
 		}
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,30 +1,30 @@  discard block
 block discarded – undo
1 1
 <?php declare(strict_types=1);
2 2
 
3 3
 class DummyPlayer extends AbstractSmrPlayer {
4
-	public function __construct($gameID=0,$playerName='Dummy',$raceID=1,$experience=1000,$alignment=100,$allianceID=0,$shipTypeID=60) {
4
+	public function __construct($gameID = 0, $playerName = 'Dummy', $raceID = 1, $experience = 1000, $alignment = 100, $allianceID = 0, $shipTypeID = 60) {
5 5
 		$this->accountID				= 0;
6
-		$this->gameID					= (int) $gameID;
7
-		$this->playerName				= (string) $playerName;
6
+		$this->gameID = (int)$gameID;
7
+		$this->playerName = (string)$playerName;
8 8
 		$this->playerID					= 0;
9 9
 		$this->sectorID					= 0;
10
-		$this->lastSectorID				= 0;
10
+		$this->lastSectorID = 0;
11 11
 		$this->turns					= 1000;
12
-		$this->newbieTurns				= 0;
12
+		$this->newbieTurns = 0;
13 13
 		$this->lastNewsUpdate			= 0;
14 14
 		$this->dead						= false;
15 15
 		$this->landedOnPlanet			= false;
16
-		$this->lastActive				= 0;
17
-		$this->lastCPLAction			= 0;
18
-		$this->raceID					= (int) $raceID;
19
-		$this->credits					= 0;
20
-		$this->experience				= (int) $experience;
21
-		$this->alignment				= (int) $alignment;
22
-		$this->militaryPayment			= 0;
23
-		$this->allianceID				= (int) $allianceID;
24
-		$this->shipID					= (int) $shipTypeID;
16
+		$this->lastActive = 0;
17
+		$this->lastCPLAction = 0;
18
+		$this->raceID = (int)$raceID;
19
+		$this->credits = 0;
20
+		$this->experience				= (int)$experience;
21
+		$this->alignment = (int)$alignment;
22
+		$this->militaryPayment = 0;
23
+		$this->allianceID				= (int)$allianceID;
24
+		$this->shipID					= (int)$shipTypeID;
25 25
 		$this->kills					= 0;
26 26
 		$this->deaths					= 0;
27
-		$this->lastPort					= 0;
27
+		$this->lastPort = 0;
28 28
 		$this->bank						= 0;
29 29
 		$this->zoom						= 0;
30 30
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	}
49 49
 
50 50
 	public function setAllianceID($ID) {
51
-		if($this->allianceID == $ID)
51
+		if ($this->allianceID == $ID)
52 52
 			return;
53
-		$this->allianceID=$ID;
53
+		$this->allianceID = $ID;
54 54
 	}
55 55
 
56 56
 	public function &killPlayerByPlayer(AbstractSmrPlayer $killer) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		$db = MySqlDatabase::getInstance();
77 77
 		$db->query('REPLACE INTO cached_dummys ' .
78 78
 					'(type, id, info) ' .
79
-					'VALUES (\'DummyPlayer\', '.$db->escapeString($this->getPlayerName()).', '.$db->escapeString($cache).')');
79
+					'VALUES (\'DummyPlayer\', ' . $db->escapeString($this->getPlayerName()) . ', ' . $db->escapeString($cache) . ')');
80 80
 		 unserialize($cache);
81 81
 	}
82 82
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 		$db->query('SELECT info FROM cached_dummys
86 86
 					WHERE type = \'DummyPlayer\'
87 87
 						AND id = ' . $db->escapeString($name) . ' LIMIT 1');
88
-		if($db->nextRecord()) {
88
+		if ($db->nextRecord()) {
89 89
 			$return = unserialize($db->getField('info'));
90 90
 			return $return;
91 91
 		}
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		$db->query('SELECT id FROM cached_dummys
101 101
 					WHERE type = \'DummyPlayer\'');
102 102
 		$dummyNames = array();
103
-		while($db->nextRecord()) {
103
+		while ($db->nextRecord()) {
104 104
 			$dummyNames[] = $db->getField('id');
105 105
 		}
106 106
 		return $dummyNames;
Please login to merge, or discard this patch.
lib/Default/AbstractSmrShip.class.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -857,14 +857,14 @@
 block discarded – undo
857 857
 
858 858
 	public function isFederal() {
859 859
 		return $this->getShipTypeID() == SHIP_TYPE_FEDERAL_DISCOVERY ||
860
-		       $this->getShipTypeID() == SHIP_TYPE_FEDERAL_WARRANT ||
861
-		       $this->getShipTypeID() == SHIP_TYPE_FEDERAL_ULTIMATUM;
860
+			   $this->getShipTypeID() == SHIP_TYPE_FEDERAL_WARRANT ||
861
+			   $this->getShipTypeID() == SHIP_TYPE_FEDERAL_ULTIMATUM;
862 862
 	}
863 863
 
864 864
 	public function isUnderground() {
865 865
 		return $this->getShipTypeID() == SHIP_TYPE_THIEF ||
866
-		       $this->getShipTypeID() == SHIP_TYPE_ASSASSIN ||
867
-		       $this->getShipTypeID() == SHIP_TYPE_DEATH_CRUISER;
866
+			   $this->getShipTypeID() == SHIP_TYPE_ASSASSIN ||
867
+			   $this->getShipTypeID() == SHIP_TYPE_DEATH_CRUISER;
868 868
 	}
869 869
 
870 870
 	public function &shootPlayer(AbstractSmrPlayer $targetPlayer) {
Please login to merge, or discard this 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.
engine/Default/galactic_post_past.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 $publishedGames = array();
18 18
 while ($db->nextRecord()) {
19 19
 	$publishedGames[] = array('game_name' => $db->getField('game_name'),
20
-	                          'game_id' => $db->getInt('game_id'));
20
+							  'game_id' => $db->getInt('game_id'));
21 21
 }
22 22
 $template->assign('PublishedGames', $publishedGames);
23 23
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	$container['back'] = true;
32 32
 
33 33
 	$pastEditions[] = array('title' => $db->getField('title'),
34
-	                        'online_since' => $db->getInt('online_since'),
35
-	                        'href' => SmrSession::getNewHREF($container));
34
+							'online_since' => $db->getInt('online_since'),
35
+							'href' => SmrSession::getNewHREF($container));
36 36
 }
37 37
 $template->assign('PastEditions', $pastEditions);
Please login to merge, or discard this patch.
engine/Default/message_view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@
 block discarded – undo
202 202
 					AND receiver_delete = ' . $db->escapeBoolean(false) . '
203 203
 					ORDER BY send_time DESC');
204 204
 	while ($db->nextRecord()) {
205
-		$groupBox =& $messageBox['GroupedMessages'][$db->getInt('sender_id')];
205
+		$groupBox = & $messageBox['GroupedMessages'][$db->getInt('sender_id')];
206 206
 		// Limit the number of messages in each group
207 207
 		if (!isset($groupBox['Messages']) || count($groupBox['Messages']) < MESSAGE_SCOUT_GROUP_LIMIT) {
208 208
 			displayMessage($groupBox, $db->getInt('message_id'), $db->getInt('account_id'), $db->getInt('sender_id'), stripslashes($db->getField('message_text')), $db->getInt('send_time'), $db->getBoolean('msg_read'), MSG_SCOUT);
Please login to merge, or discard this patch.
engine/Default/help.inc 2 patches
Braces   +30 added lines, -22 removed lines patch added patch discarded remove patch
@@ -22,16 +22,18 @@  discard block
 block discarded – undo
22 22
 		$db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($order_id - 1));
23 23
 
24 24
 		// no result?
25
-		if (!$db2->getNumRows())
26
-			$db2->query('SELECT * FROM manual WHERE topic_id = '.$db2->escapeNumber($parent_topic_id));
25
+		if (!$db2->getNumRows()) {
26
+					$db2->query('SELECT * FROM manual WHERE topic_id = '.$db2->escapeNumber($parent_topic_id));
27
+		}
27 28
 
28 29
 		echo ('<th width="32">');
29 30
 		if ($db2->nextRecord()) {
30 31
 			$previous_topic_id = $db2->getInt('topic_id');
31 32
 			$previous_topic = stripslashes($db2->getField('topic'));
32 33
 			echo ('<a href="/manual.php?'.$previous_topic_id.'"><img src="/images/help/previous.jpg" width="32" height="32" border="0"></a>');
33
-		} else
34
-			echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
34
+		} else {
35
+					echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
36
+		}
35 37
 		echo ('</th>');
36 38
 
37 39
 		// **************************
@@ -43,8 +45,9 @@  discard block
 block discarded – undo
43 45
 			$up_topic_id = $db2->getInt('topic_id');
44 46
 			$up_topic = stripslashes($db2->getField('topic'));
45 47
 			echo ('<a href="/manual.php?'.$up_topic_id.'"><img src="/images/help/up.jpg" width="32" height="32" border="0"></a>');
46
-		} else
47
-			echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
48
+		} else {
49
+					echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
50
+		}
48 51
 		echo ('</th>');
49 52
 
50 53
 		// **************************
@@ -52,8 +55,9 @@  discard block
 block discarded – undo
52 55
 		// **************************
53 56
 		$db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($topic_id).' AND order_id = 1');
54 57
 
55
-		if (!$db2->getNumRows())
56
-			$db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($order_id + 1));
58
+		if (!$db2->getNumRows()) {
59
+					$db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($order_id + 1));
60
+		}
57 61
 
58 62
 		$seenParentIDs = array(0);
59 63
 		$curr_parent_topic_id = $parent_topic_id;
@@ -72,8 +76,7 @@  discard block
 block discarded – undo
72 76
 			$next_topic_id = $db2->getInt('topic_id');
73 77
 			$next_topic = stripslashes($db2->getField('topic'));
74 78
 			echo ('<a href="/manual.php?'.$next_topic_id.'"><img src="/images/help/next.jpg" width="32" height="32" border="0"></a>');
75
-		}
76
-		else {
79
+		} else {
77 80
 			echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
78 81
 		}
79 82
 		echo ('</th>');
@@ -85,18 +88,22 @@  discard block
 block discarded – undo
85 88
 
86 89
 		echo ('<tr>');
87 90
 		echo ('<td colspan="5">');
88
-		if (isset($previous_topic_id) && $previous_topic_id > 0)
89
-			echo ('<b>Previous:</b> <a href="/manual.php?'.$previous_topic_id.'">' . get_numbering($previous_topic_id) . $previous_topic.'</a>&nbsp;&nbsp;&nbsp;');
90
-		if (isset($up_topic_id) && $up_topic_id > 0)
91
-			echo ('<b>Up:</b> <a href="/manual.php?'.$up_topic_id.'">' . get_numbering($up_topic_id) . $up_topic.'</a>&nbsp;&nbsp;&nbsp;');
92
-		if (isset($next_topic_id) && $next_topic_id > 0)
93
-			echo ('<b>Next:</b> <a href="/manual.php?'.$next_topic_id.'">' . get_numbering($next_topic_id) . $next_topic.'</a>');
91
+		if (isset($previous_topic_id) && $previous_topic_id > 0) {
92
+					echo ('<b>Previous:</b> <a href="/manual.php?'.$previous_topic_id.'">' . get_numbering($previous_topic_id) . $previous_topic.'</a>&nbsp;&nbsp;&nbsp;');
93
+		}
94
+		if (isset($up_topic_id) && $up_topic_id > 0) {
95
+					echo ('<b>Up:</b> <a href="/manual.php?'.$up_topic_id.'">' . get_numbering($up_topic_id) . $up_topic.'</a>&nbsp;&nbsp;&nbsp;');
96
+		}
97
+		if (isset($next_topic_id) && $next_topic_id > 0) {
98
+					echo ('<b>Next:</b> <a href="/manual.php?'.$next_topic_id.'">' . get_numbering($next_topic_id) . $next_topic.'</a>');
99
+		}
94 100
 		echo ('</tr>');
95 101
 
96 102
 		echo ('</table>');
97
-	} else
98
-		echo ('Invalid Topic!');
99
-}
103
+	} else {
104
+			echo ('Invalid Topic!');
105
+	}
106
+	}
100 107
 
101 108
 function echo_content($topic_id) {
102 109
 	// database object
@@ -114,9 +121,10 @@  discard block
 block discarded – undo
114 121
 		echo ('<h1>' . get_numbering($topic_id) . $topic.'</h1>');
115 122
 		echo ('<p>'.$text.'<p>');
116 123
 		echo ('</div>');
117
-	} else
118
-		echo ('Invalid Topic!');
119
-}
124
+	} else {
125
+			echo ('Invalid Topic!');
126
+	}
127
+	}
120 128
 
121 129
 function echo_subsection($topic_id) {
122 130
 	// database object
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 	$db3 = MySqlDatabase::getInstance();
8 8
 
9 9
 	// get current entry
10
-	$db->query('SELECT * FROM manual WHERE topic_id = '.$db->escapeNumber($topic_id));
10
+	$db->query('SELECT * FROM manual WHERE topic_id = ' . $db->escapeNumber($topic_id));
11 11
 	if ($db->nextRecord()) {
12 12
 		$parent_topic_id = $db->getInt('parent_topic_id');
13 13
 		$order_id = $db->getInt('order_id');
@@ -19,17 +19,17 @@  discard block
 block discarded – undo
19 19
 		// **************************
20 20
 		// **  PREVIOUS
21 21
 		// **************************
22
-		$db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($order_id - 1));
22
+		$db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($parent_topic_id) . ' AND order_id = ' . $db2->escapeNumber($order_id - 1));
23 23
 
24 24
 		// no result?
25 25
 		if (!$db2->getNumRows())
26
-			$db2->query('SELECT * FROM manual WHERE topic_id = '.$db2->escapeNumber($parent_topic_id));
26
+			$db2->query('SELECT * FROM manual WHERE topic_id = ' . $db2->escapeNumber($parent_topic_id));
27 27
 
28 28
 		echo ('<th width="32">');
29 29
 		if ($db2->nextRecord()) {
30 30
 			$previous_topic_id = $db2->getInt('topic_id');
31 31
 			$previous_topic = stripslashes($db2->getField('topic'));
32
-			echo ('<a href="/manual.php?'.$previous_topic_id.'"><img src="/images/help/previous.jpg" width="32" height="32" border="0"></a>');
32
+			echo ('<a href="/manual.php?' . $previous_topic_id . '"><img src="/images/help/previous.jpg" width="32" height="32" border="0"></a>');
33 33
 		} else
34 34
 			echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
35 35
 		echo ('</th>');
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
 		// **************************
38 38
 		// **  UP
39 39
 		// **************************
40
-		$db2->query('SELECT * FROM manual WHERE topic_id = '.$db2->escapeNumber($parent_topic_id));
40
+		$db2->query('SELECT * FROM manual WHERE topic_id = ' . $db2->escapeNumber($parent_topic_id));
41 41
 		echo ('<th width="32">');
42 42
 		if ($db2->nextRecord()) {
43 43
 			$up_topic_id = $db2->getInt('topic_id');
44 44
 			$up_topic = stripslashes($db2->getField('topic'));
45
-			echo ('<a href="/manual.php?'.$up_topic_id.'"><img src="/images/help/up.jpg" width="32" height="32" border="0"></a>');
45
+			echo ('<a href="/manual.php?' . $up_topic_id . '"><img src="/images/help/up.jpg" width="32" height="32" border="0"></a>');
46 46
 		} else
47 47
 			echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
48 48
 		echo ('</th>');
@@ -50,35 +50,35 @@  discard block
 block discarded – undo
50 50
 		// **************************
51 51
 		// **  NEXT
52 52
 		// **************************
53
-		$db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($topic_id).' AND order_id = 1');
53
+		$db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($topic_id) . ' AND order_id = 1');
54 54
 
55 55
 		if (!$db2->getNumRows())
56
-			$db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($order_id + 1));
56
+			$db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($parent_topic_id) . ' AND order_id = ' . $db2->escapeNumber($order_id + 1));
57 57
 
58 58
 		$seenParentIDs = array(0);
59 59
 		$curr_parent_topic_id = $parent_topic_id;
60 60
 		while (!$db2->getNumRows() && !in_array($curr_parent_topic_id, $seenParentIDs)) {
61 61
 			$seenParentIDs[] = $curr_parent_topic_id;
62
-			$db3->query('SELECT * FROM manual WHERE topic_id = '.$db3->escapeNumber($parent_topic_id));
62
+			$db3->query('SELECT * FROM manual WHERE topic_id = ' . $db3->escapeNumber($parent_topic_id));
63 63
 			$db3->nextRecord();
64 64
 			$curr_order_id = $db3->getInt('order_id');
65 65
 			$curr_parent_topic_id = $db3->getInt('parent_topic_id');
66 66
 
67
-			$db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($curr_order_id + 1));
67
+			$db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($parent_topic_id) . ' AND order_id = ' . $db2->escapeNumber($curr_order_id + 1));
68 68
 		}
69 69
 
70 70
 		echo ('<th width="32">');
71 71
 		if ($db2->nextRecord()) {
72 72
 			$next_topic_id = $db2->getInt('topic_id');
73 73
 			$next_topic = stripslashes($db2->getField('topic'));
74
-			echo ('<a href="/manual.php?'.$next_topic_id.'"><img src="/images/help/next.jpg" width="32" height="32" border="0"></a>');
74
+			echo ('<a href="/manual.php?' . $next_topic_id . '"><img src="/images/help/next.jpg" width="32" height="32" border="0"></a>');
75 75
 		}
76 76
 		else {
77 77
 			echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
78 78
 		}
79 79
 		echo ('</th>');
80 80
 
81
-		echo ('<th width="100%" class="center" validn="middle" style="font-size:18pt;font-weight:bold;">' . get_numbering($topic_id) . $topic.'</th>');
81
+		echo ('<th width="100%" class="center" validn="middle" style="font-size:18pt;font-weight:bold;">' . get_numbering($topic_id) . $topic . '</th>');
82 82
 		echo ('<th width="32"><a href="/manual_toc.php"><img src="/images/help/contents.jpg" width="32" height="32" border="0"></a></th>');
83 83
 
84 84
 		echo ('</tr>');
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
 		echo ('<tr>');
87 87
 		echo ('<td colspan="5">');
88 88
 		if (isset($previous_topic_id) && $previous_topic_id > 0)
89
-			echo ('<b>Previous:</b> <a href="/manual.php?'.$previous_topic_id.'">' . get_numbering($previous_topic_id) . $previous_topic.'</a>&nbsp;&nbsp;&nbsp;');
89
+			echo ('<b>Previous:</b> <a href="/manual.php?' . $previous_topic_id . '">' . get_numbering($previous_topic_id) . $previous_topic . '</a>&nbsp;&nbsp;&nbsp;');
90 90
 		if (isset($up_topic_id) && $up_topic_id > 0)
91
-			echo ('<b>Up:</b> <a href="/manual.php?'.$up_topic_id.'">' . get_numbering($up_topic_id) . $up_topic.'</a>&nbsp;&nbsp;&nbsp;');
91
+			echo ('<b>Up:</b> <a href="/manual.php?' . $up_topic_id . '">' . get_numbering($up_topic_id) . $up_topic . '</a>&nbsp;&nbsp;&nbsp;');
92 92
 		if (isset($next_topic_id) && $next_topic_id > 0)
93
-			echo ('<b>Next:</b> <a href="/manual.php?'.$next_topic_id.'">' . get_numbering($next_topic_id) . $next_topic.'</a>');
93
+			echo ('<b>Next:</b> <a href="/manual.php?' . $next_topic_id . '">' . get_numbering($next_topic_id) . $next_topic . '</a>');
94 94
 		echo ('</tr>');
95 95
 
96 96
 		echo ('</table>');
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	$db = MySqlDatabase::getInstance();
104 104
 
105 105
 	// get current entry
106
-	$db->query('SELECT * FROM manual WHERE topic_id = '.$topic_id);
106
+	$db->query('SELECT * FROM manual WHERE topic_id = ' . $topic_id);
107 107
 	if ($db->nextRecord()) {
108 108
 		$parent_topic_id = $db->getInt('parent_topic_id');
109 109
 		$order_id = $db->getInt('order_id');
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 		$text = stripslashes($db->getField('text'));
112 112
 
113 113
 		echo ('<div id="help_content">');
114
-		echo ('<h1>' . get_numbering($topic_id) . $topic.'</h1>');
115
-		echo ('<p>'.$text.'<p>');
114
+		echo ('<h1>' . get_numbering($topic_id) . $topic . '</h1>');
115
+		echo ('<p>' . $text . '<p>');
116 116
 		echo ('</div>');
117 117
 	} else
118 118
 		echo ('Invalid Topic!');
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
 function echo_subsection($topic_id) {
122 122
 	// database object
123 123
 	$db = MySqlDatabase::getInstance();
124
-	$return='';
124
+	$return = '';
125 125
 	// check if there are subsections
126
-	$db->query('SELECT * FROM manual WHERE parent_topic_id = '.$db->escapeNumber($topic_id).' ORDER BY order_id');
126
+	$db->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db->escapeNumber($topic_id) . ' ORDER BY order_id');
127 127
 	if ($db->getNumRows()) {
128 128
 		echo ('<hr noshade width="75%" size="1" class="center"/>');
129 129
 		echo ('<div id="help_menu">');
@@ -137,19 +137,19 @@  discard block
 block discarded – undo
137 137
 }
138 138
 
139 139
 function echo_menu($topic_id) {
140
-	$return='';
140
+	$return = '';
141 141
 	// database object
142 142
 	$db = MySqlDatabase::getInstance();
143 143
 
144
-	$db->query('SELECT * FROM manual WHERE parent_topic_id = '.$db->escapeNumber($topic_id).' ORDER BY order_id');
144
+	$db->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db->escapeNumber($topic_id) . ' ORDER BY order_id');
145 145
 	if ($db->getNumRows()) {
146 146
 		echo ('<ul type="disc">');
147
-		while($db->nextRecord()) {
147
+		while ($db->nextRecord()) {
148 148
 			$sub_topic_id = $db->getInt('topic_id');
149 149
 			$order_id = $db->getInt('order_id');
150 150
 			$sub_topic = stripslashes($db->getField('topic'));
151 151
 
152
-			echo ('<li><a href="/manual.php?'.$sub_topic_id.'">' . get_numbering($sub_topic_id) . $sub_topic.'</a></li>');
152
+			echo ('<li><a href="/manual.php?' . $sub_topic_id . '">' . get_numbering($sub_topic_id) . $sub_topic . '</a></li>');
153 153
 			echo_menu($sub_topic_id);
154 154
 		}
155 155
 		echo ('</ul>');
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 function get_numbering($topic_id) {
161 161
 	$db = MySqlDatabase::getInstance();
162 162
 
163
-	$db->query('SELECT * FROM manual WHERE topic_id = '.$db->escapeNumber($topic_id));
163
+	$db->query('SELECT * FROM manual WHERE topic_id = ' . $db->escapeNumber($topic_id));
164 164
 	if ($db->nextRecord()) {
165 165
 		$up_topic_id = $db->getInt('parent_topic_id');
166 166
 		$order_id = $db->getInt('order_id');
Please login to merge, or discard this patch.
templates/Default/engine/Default/includes/ForceTraderTeamCombatResults.inc 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -1,48 +1,48 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(is_array($TraderTeamCombatResults['Traders'])) {
4
-	foreach($TraderTeamCombatResults['Traders'] as $AccountID => $TraderResults) {
5
-		$ShootingPlayer =& $TraderResults['Player'];
6
-		$TotalDamage =& $TraderResults['TotalDamage'];
7
-		if($TraderResults['DeadBeforeShot']) {
3
+if (is_array($TraderTeamCombatResults['Traders'])) {
4
+	foreach ($TraderTeamCombatResults['Traders'] as $AccountID => $TraderResults) {
5
+		$ShootingPlayer = & $TraderResults['Player'];
6
+		$TotalDamage = & $TraderResults['TotalDamage'];
7
+		if ($TraderResults['DeadBeforeShot']) {
8 8
 			echo $ShootingPlayer->getDisplayName() ?> died before they were able to attack!<br /><?php
9 9
 		} else {
10
-			if(isset($TraderResults['Weapons']) && is_array($TraderResults['Weapons'])) {
11
-				foreach($TraderResults['Weapons'] as $WeaponResults) {
12
-					$ShootingWeapon =& $WeaponResults['Weapon'];
13
-					$ShotHit =& $WeaponResults['Hit'];
14
-					$ActualDamage =& $WeaponResults['ActualDamage'];
15
-					$WeaponDamage =& $WeaponResults['WeaponDamage'];
16
-					$TargetPlayer =& $WeaponResults['TargetPlayer'];
10
+			if (isset($TraderResults['Weapons']) && is_array($TraderResults['Weapons'])) {
11
+				foreach ($TraderResults['Weapons'] as $WeaponResults) {
12
+					$ShootingWeapon = & $WeaponResults['Weapon'];
13
+					$ShotHit = & $WeaponResults['Hit'];
14
+					$ActualDamage = & $WeaponResults['ActualDamage'];
15
+					$WeaponDamage = & $WeaponResults['WeaponDamage'];
16
+					$TargetPlayer = & $WeaponResults['TargetPlayer'];
17 17
 
18
-					echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at<?php if($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?> the debris that was once<?php } ?> the forces<?php
18
+					echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at<?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?> the debris that was once<?php } ?> the forces<?php
19 19
 					if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) {
20
-						if(!$ShotHit) {
20
+						if (!$ShotHit) {
21 21
 							?> and misses<?php
22
-						} else if($ActualDamage['TotalDamage'] == 0) {
23
-							if($WeaponDamage['Shield'] > 0) {
24
-								?> which proves ineffective against the <?php if($ActualDamage['HasMines']){ ?>mines<?php } else if($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php }
25
-							} else if($WeaponDamage['Armour'] > 0) {
26
-								?> which is deflected by the <?php if($ActualDamage['HasMines']){ ?>mines<?php } else if($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php } ?> shields<?php
22
+						} else if ($ActualDamage['TotalDamage'] == 0) {
23
+							if ($WeaponDamage['Shield'] > 0) {
24
+								?> which proves ineffective against the <?php if ($ActualDamage['HasMines']) { ?>mines<?php } else if ($ActualDamage['HasCDs']) { ?>combat drones<?php } else { ?>scout drones<?php }
25
+							} else if ($WeaponDamage['Armour'] > 0) {
26
+								?> which is deflected by the <?php if ($ActualDamage['HasMines']) { ?>mines<?php } else if ($ActualDamage['HasCDs']) { ?>combat drones<?php } else { ?>scout drones<?php } ?> shields<?php
27 27
 							} else {
28 28
 								?> but it cannot do any damage<?php
29 29
 							}
30 30
 						} else {
31 31
 							?> destroying <?php
32 32
 							$DamageTypes = 0;
33
-							if($ActualDamage['NumMines'] > 0){ $DamageTypes = $DamageTypes+1; }
34
-							if($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
35
-							if($ActualDamage['NumSDs'] > 0){ $DamageTypes = $DamageTypes+1; }
33
+							if ($ActualDamage['NumMines'] > 0) { $DamageTypes = $DamageTypes + 1; }
34
+							if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
35
+							if ($ActualDamage['NumSDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
36 36
 
37
-							if($ActualDamage['NumMines'] > 0) {
37
+							if ($ActualDamage['NumMines'] > 0) {
38 38
 								?><span class="red"><?php echo number_format($ActualDamage['NumMines']) ?></span> mines<?php
39 39
 								$this->doDamageTypeReductionDisplay($DamageTypes);
40 40
 							}
41
-							if($ActualDamage['NumCDs'] > 0) {
41
+							if ($ActualDamage['NumCDs'] > 0) {
42 42
 								?><span class="red"><?php echo number_format($ActualDamage['NumCDs']) ?></span> combat drones<?php
43 43
 								$this->doDamageTypeReductionDisplay($DamageTypes);
44 44
 							}
45
-							if($ActualDamage['NumSDs'] > 0) {
45
+							if ($ActualDamage['NumSDs'] > 0) {
46 46
 								?><span class="red"><?php echo number_format($ActualDamage['NumSDs']) ?></span> scout drones<?php
47 47
 							}
48 48
 						}
@@ -53,71 +53,71 @@  discard block
 block discarded – undo
53 53
 					}
54 54
 				}
55 55
 			}
56
-			if(isset($TraderResults['Drones'])) {
57
-				$Drones =& $TraderResults['Drones'];
58
-				$ActualDamage =& $Drones['ActualDamage'];
59
-				$WeaponDamage =& $Drones['WeaponDamage'];
60
-				$TargetPlayer =& $Drones['TargetPlayer'];
56
+			if (isset($TraderResults['Drones'])) {
57
+				$Drones = & $TraderResults['Drones'];
58
+				$ActualDamage = & $Drones['ActualDamage'];
59
+				$WeaponDamage = & $Drones['WeaponDamage'];
60
+				$TargetPlayer = & $Drones['TargetPlayer'];
61 61
 
62 62
 				echo $ShootingPlayer->getDisplayName();
63
-				if($WeaponDamage['Launched'] == 0) {
63
+				if ($WeaponDamage['Launched'] == 0) {
64 64
 					?> fails to launch their combat drones<?php
65 65
 				} else {
66
-					?> launches <span class="cds"><?php echo $WeaponDamage['Launched'] ?></span> combat drones at<?php if($ActualDamage['TargetAlreadyDead']){ ?> the debris that was once <?php } ?> the forces<?php
67
-					if(!$ActualDamage['TargetAlreadyDead']) {
68
-						if($ActualDamage['TotalDamage'] == 0) {
69
-							if($WeaponDamage['Shield'] > 0) {
70
-								?> which prove ineffective against the <?php if($ActualDamage['HasMines']){ ?>mines<?php } else if($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php }
71
-							} else if($WeaponDamage['Armour'] > 0) {
66
+					?> launches <span class="cds"><?php echo $WeaponDamage['Launched'] ?></span> combat drones at<?php if ($ActualDamage['TargetAlreadyDead']) { ?> the debris that was once <?php } ?> the forces<?php
67
+					if (!$ActualDamage['TargetAlreadyDead']) {
68
+						if ($ActualDamage['TotalDamage'] == 0) {
69
+							if ($WeaponDamage['Shield'] > 0) {
70
+								?> which prove ineffective against the <?php if ($ActualDamage['HasMines']) { ?>mines<?php } else if ($ActualDamage['HasCDs']) { ?>combat drones<?php } else { ?>scout drones<?php }
71
+							} else if ($WeaponDamage['Armour'] > 0) {
72 72
 								?> which is deflected by the <?php
73
-								if($ActualDamage['HasMines']){ ?>mines<?php } else if($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php } ?> shields<?php
73
+								if ($ActualDamage['HasMines']) { ?>mines<?php } else if ($ActualDamage['HasCDs']) { ?>combat drones<?php } else { ?>scout drones<?php } ?> shields<?php
74 74
 							} else {
75 75
 								?> but they cannot do any damage<?php
76 76
 							}
77 77
 						} else {
78 78
 							$DamageTypes = 0;
79
-							if($ActualDamage['NumMines'] > $WeaponDamage['Kamikaze']) { $DamageTypes = $DamageTypes+1; }
80
-							if($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
81
-							if($ActualDamage['NumSDs'] > 0){ $DamageTypes = $DamageTypes+1; }
79
+							if ($ActualDamage['NumMines'] > $WeaponDamage['Kamikaze']) { $DamageTypes = $DamageTypes + 1; }
80
+							if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
81
+							if ($ActualDamage['NumSDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
82 82
 
83
-							if($WeaponDamage['Kamikaze'] == 0) {
83
+							if ($WeaponDamage['Kamikaze'] == 0) {
84 84
 								?> destroying <?php
85 85
 							} else {
86 86
 								?> of which <span class="cds"><?php echo $WeaponDamage['Kamikaze'] ?></span> kamikaze against <span class="red"><?php echo $WeaponDamage['Kamikaze'] ?></span> mines<?php
87
-								if($DamageTypes > 0) {
87
+								if ($DamageTypes > 0) {
88 88
 									?> whilst the others destroy <?php
89 89
 								}
90 90
 							}
91
-							if($ActualDamage['NumMines'] > $WeaponDamage['Kamikaze']) {
91
+							if ($ActualDamage['NumMines'] > $WeaponDamage['Kamikaze']) {
92 92
 								?><span class="red"><?php echo number_format($ActualDamage['NumMines']) ?></span> mines<?php
93 93
 								$this->doDamageTypeReductionDisplay($DamageTypes);
94 94
 							}
95
-							if($ActualDamage['NumCDs'] > 0) {
95
+							if ($ActualDamage['NumCDs'] > 0) {
96 96
 								?><span class="red"><?php echo number_format($ActualDamage['NumCDs']) ?></span> combat drones<?php
97 97
 								$this->doDamageTypeReductionDisplay($DamageTypes);
98 98
 							}
99
-							if($ActualDamage['NumSDs'] > 0) {
99
+							if ($ActualDamage['NumSDs'] > 0) {
100 100
 								?><span class="red"><?php echo number_format($ActualDamage['NumSDs']) ?></span> scout drones<?php
101 101
 							}
102 102
 						}
103 103
 					}
104 104
 				}?>.
105 105
 				<br />
106
-				<?php if($ActualDamage['KillingShot']) {
106
+				<?php if ($ActualDamage['KillingShot']) {
107 107
 					?>Forces are <span class="red">DESTROYED!</span><br /><?php
108 108
 				}
109 109
 			}
110 110
 		}
111 111
 		echo $ShootingPlayer->getDisplayName();
112
-		if($TotalDamage > 0) {
112
+		if ($TotalDamage > 0) {
113 113
 			?> hits for a total of <span class="red"><?php echo $TotalDamage ?></span> damage in this round of combat<?php
114 114
 		} else {
115 115
 			?> does no damage this round.<?php
116
-			if(!$TraderResults['DeadBeforeShot']) {
116
+			if (!$TraderResults['DeadBeforeShot']) {
117 117
 				?> Maybe they should go back to the academy<?php
118 118
 			}
119 119
 		} ?>.<br /><br /><?php
120 120
 	}
121 121
 }
122 122
 $TotalDamage = $TraderTeamCombatResults['TotalDamage']; ?>
123
-This fleet <?php if($TotalDamage > 0){ ?>hits for a total of <span class="red"><?php echo $TotalDamage ?></span> damage in this round of combat<?php } else{ ?>does no damage this round. You call that a fleet? They need a better recruiter<?php } ?>.
123
+This fleet <?php if ($TotalDamage > 0) { ?>hits for a total of <span class="red"><?php echo $TotalDamage ?></span> damage in this round of combat<?php } else { ?>does no damage this round. You call that a fleet? They need a better recruiter<?php } ?>.
Please login to merge, or discard this patch.