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

Failed Conditions
Pull Request — master (#817)
by Dan
03:42
created
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.
templates/Default/engine/Default/includes/PlanetTraderTeamCombatResults.inc 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2
-foreach($TraderTeamCombatResults['Traders'] as $AccountID => $TraderResults) {
3
-	$ShootingPlayer =& $TraderResults['Player'];
4
-	$TotalDamage =& $TraderResults['TotalDamage'];
5
-	if($MinimalDisplay && !$ThisPlayer->equals($ShootingPlayer)) {
2
+foreach ($TraderTeamCombatResults['Traders'] as $AccountID => $TraderResults) {
3
+	$ShootingPlayer = & $TraderResults['Player'];
4
+	$TotalDamage = & $TraderResults['TotalDamage'];
5
+	if ($MinimalDisplay && !$ThisPlayer->equals($ShootingPlayer)) {
6 6
 		echo $ShootingPlayer->getDisplayName();
7
-		if($TotalDamage > 0) {
7
+		if ($TotalDamage > 0) {
8 8
 			?> hits for a total of <span class="red"><?php echo $TotalDamage ?></span> damage in this round of combat<?php
9 9
 		} else {
10 10
 			?> does no damage this round<?php
@@ -12,29 +12,29 @@  discard block
 block discarded – undo
12 12
 		continue;
13 13
 	}
14 14
 
15
-	if($TraderResults['DeadBeforeShot']) {
15
+	if ($TraderResults['DeadBeforeShot']) {
16 16
 		echo $ShootingPlayer->getDisplayName() ?> died before they were able to attack!<br /><?php
17 17
 	} else {
18
-		if(isset($TraderResults['Weapons']) && is_array($TraderResults['Weapons'])) {
19
-			foreach($TraderResults['Weapons'] as $WeaponResults) {
20
-				$ShootingWeapon =& $WeaponResults['Weapon'];
21
-				$ShotHit =& $WeaponResults['Hit'];
22
-				$ActualDamage =& $WeaponResults['ActualDamage'];
23
-				$WeaponDamage =& $WeaponResults['WeaponDamage'];
24
-				$TargetPlanet =& $WeaponResults['TargetPlanet'];
18
+		if (isset($TraderResults['Weapons']) && is_array($TraderResults['Weapons'])) {
19
+			foreach ($TraderResults['Weapons'] as $WeaponResults) {
20
+				$ShootingWeapon = & $WeaponResults['Weapon'];
21
+				$ShotHit = & $WeaponResults['Hit'];
22
+				$ActualDamage = & $WeaponResults['ActualDamage'];
23
+				$WeaponDamage = & $WeaponResults['WeaponDamage'];
24
+				$TargetPlanet = & $WeaponResults['TargetPlanet'];
25 25
 				
26
-				echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at <?php if($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?>the debris that was once <?php } echo $TargetPlanet->getDisplayName();
26
+				echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?>the debris that was once <?php } echo $TargetPlanet->getDisplayName();
27 27
 				if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) {
28
-					if(!$ShotHit) {
28
+					if (!$ShotHit) {
29 29
 						?> and misses<?php
30
-					} else if($ActualDamage['TotalDamage'] == 0) {
31
-						if($WeaponDamage['Shield'] > 0) {
32
-							if($ActualDamage['HasCDs']) {
30
+					} else if ($ActualDamage['TotalDamage'] == 0) {
31
+						if ($WeaponDamage['Shield'] > 0) {
32
+							if ($ActualDamage['HasCDs']) {
33 33
 								?> which proves ineffective against their combat drones<?php
34 34
 							} else {
35 35
 								?> which washes harmlessly over their hull<?php
36 36
 							}
37
-						} else if($WeaponDamage['Armour'] > 0) {
37
+						} else if ($WeaponDamage['Armour'] > 0) {
38 38
 							?> which is deflected by their shields<?php
39 39
 						} else {
40 40
 							?> but it cannot do any damage<?php
@@ -42,96 +42,96 @@  discard block
 block discarded – undo
42 42
 					} else {
43 43
 						?> destroying <?php
44 44
 						$DamageTypes = 0;
45
-						if($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
46
-						if($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
47
-						if($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
45
+						if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
46
+						if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
47
+						if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
48 48
 
49
-						if($ActualDamage['Shield'] > 0) {
49
+						if ($ActualDamage['Shield'] > 0) {
50 50
 							?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php
51 51
 							$this->doDamageTypeReductionDisplay($DamageTypes);
52 52
 						}
53
-						if($ActualDamage['NumCDs'] > 0) {
53
+						if ($ActualDamage['NumCDs'] > 0) {
54 54
 							?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']) ?></span> combat drones<?php
55 55
 							$this->doDamageTypeReductionDisplay($DamageTypes);
56 56
 						}
57
-						if($ActualDamage['Armour'] > 0) {
57
+						if ($ActualDamage['Armour'] > 0) {
58 58
 							?><span class="red"><?php echo number_format($ActualDamage['Armour']) ?></span> plates of armour<?php
59 59
 						}
60 60
 					}
61 61
 				} ?>.
62 62
 				<br /><?php
63 63
 				if ($ShotHit && $ActualDamage['KillingShot']) {
64
-					$this->includeTemplate('includes/PlanetKillMessage.inc',array('KillResults'=>$WeaponResults['KillResults'],'TargetPlanet'=>$TargetPlanet));
64
+					$this->includeTemplate('includes/PlanetKillMessage.inc', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPlanet'=>$TargetPlanet));
65 65
 				}
66 66
 			}
67 67
 		}
68
-		if(isset($TraderResults['Drones'])) {
69
-			$Drones =& $TraderResults['Drones'];
70
-			$ActualDamage =& $Drones['ActualDamage'];
71
-			$WeaponDamage =& $Drones['WeaponDamage'];
72
-			$TargetPlanet =& $Drones['TargetPlanet'];
68
+		if (isset($TraderResults['Drones'])) {
69
+			$Drones = & $TraderResults['Drones'];
70
+			$ActualDamage = & $Drones['ActualDamage'];
71
+			$WeaponDamage = & $Drones['WeaponDamage'];
72
+			$TargetPlanet = & $Drones['TargetPlanet'];
73 73
 			$DamageTypes = 0;
74
-			if($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
75
-			if($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
76
-			if($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
74
+			if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
75
+			if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
76
+			if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
77 77
 
78 78
 			echo $ShootingPlayer->getDisplayName();
79
-			if($WeaponDamage['Launched'] == 0) {
79
+			if ($WeaponDamage['Launched'] == 0) {
80 80
 				?> fails to launch their combat drones<?php
81 81
 			} else {
82 82
 				?> launches <span class="cds"><?php echo $WeaponDamage['Launched'] ?></span> combat drones at <?php
83
-				if($ActualDamage['TargetAlreadyDead']) {
83
+				if ($ActualDamage['TargetAlreadyDead']) {
84 84
 					?>the debris that was once <?php
85 85
 				}
86 86
 				echo $TargetPlanet->getDisplayName();
87
-				if(!$ActualDamage['TargetAlreadyDead']) {
88
-					if($ActualDamage['TotalDamage'] == 0) {
89
-						if($WeaponDamage['Shield'] > 0) {
90
-							if($ActualDamage['HasCDs']) {
87
+				if (!$ActualDamage['TargetAlreadyDead']) {
88
+					if ($ActualDamage['TotalDamage'] == 0) {
89
+						if ($WeaponDamage['Shield'] > 0) {
90
+							if ($ActualDamage['HasCDs']) {
91 91
 								?> which prove ineffective against their combat drones<?php
92 92
 							} else {
93 93
 								?> which washes harmlessly over their hull<?php
94 94
 							}
95 95
 						}
96
-						if($ActualDamage['Armour'] > 0) {
96
+						if ($ActualDamage['Armour'] > 0) {
97 97
 							?> which is deflected by their shields<?php
98 98
 						} else {
99 99
 							?> but they cannot do any damage<?php
100 100
 						}
101 101
 					} else {
102 102
 						?> destroying <?php
103
-						if($ActualDamage['Shield'] > 0) {
103
+						if ($ActualDamage['Shield'] > 0) {
104 104
 							?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php
105 105
 							$this->doDamageTypeReductionDisplay($DamageTypes);
106 106
 						}
107
-						if($ActualDamage['NumCDs'] > 0) {
107
+						if ($ActualDamage['NumCDs'] > 0) {
108 108
 							?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']) ?></span> combat drones<?php
109 109
 							$this->doDamageTypeReductionDisplay($DamageTypes);
110 110
 						}
111
-						if($ActualDamage['Armour'] > 0) {
111
+						if ($ActualDamage['Armour'] > 0) {
112 112
 							?><span class="red"><?php echo number_format($ActualDamage['Armour']) ?></span> plates of armour<?php
113 113
 						}
114 114
 					}
115 115
 				}
116 116
 			} ?>.
117 117
 			<br /><?php
118
-			if($ActualDamage['KillingShot']) {
119
-				$this->includeTemplate('includes/PlanetKillMessage.inc',array('KillResults'=>$Drones['KillResults'],'TargetPlanet'=>$TargetPlanet));
118
+			if ($ActualDamage['KillingShot']) {
119
+				$this->includeTemplate('includes/PlanetKillMessage.inc', array('KillResults'=>$Drones['KillResults'], 'TargetPlanet'=>$TargetPlanet));
120 120
 			}
121 121
 		}
122 122
 	}
123 123
 	echo $ShootingPlayer->getDisplayName();
124
-	if($TotalDamage > 0) {
124
+	if ($TotalDamage > 0) {
125 125
 		?> hits for a total of <span class="red"><?php echo $TotalDamage ?></span> damage in this round of combat<?php
126 126
 	} else {
127 127
 		?> does no damage this round<?php
128
-		if(!$TraderResults['DeadBeforeShot']) {
128
+		if (!$TraderResults['DeadBeforeShot']) {
129 129
 			?>. Maybe they should go back to the academy<?php
130 130
 		}
131 131
 	} ?>.<br /><br /><?php
132 132
 }
133 133
 $TotalDamage = $TraderTeamCombatResults['TotalDamage']; ?>
134
-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 } ?>.<br /><?php
134
+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 } ?>.<br /><?php
135 135
 foreach ($TraderTeamCombatResults['Downgrades'] as $structureID => $numDestroyed) { ?>
136 136
 	This team destroys <span class="red"><?php echo $numDestroyed; ?> </span><?php echo pluralise($TargetPlanet->getStructureTypes($structureID)->name(), $numDestroyed); ?>.<br /><?php
137 137
 } ?>
Please login to merge, or discard this patch.
templates/Default/engine/Default/includes/PlanetCombatResults.inc 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $CombatPlanet = $PlanetCombatResults['Planet'];
3 3
 $TotalDamage = $PlanetCombatResults['TotalDamage'];
4
-if($MinimalDisplay) {
4
+if ($MinimalDisplay) {
5 5
 	echo $CombatPlanet->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 $PlanetCombatResults['TotalDamagePerTargetPlayer'][$ThisPlayer->getAccountID()]; ?></span> was done to you<?php
8 8
 	}
9 9
 	else {
@@ -11,29 +11,29 @@  discard block
 block discarded – undo
11 11
 	} ?>. <?php echo $AttackLogLink;
12 12
 	return;
13 13
 }
14
-if(isset($PlanetCombatResults['Weapons']) && is_array($PlanetCombatResults['Weapons'])) {
15
-	foreach($PlanetCombatResults['Weapons'] as $WeaponResults) {
16
-		$ShootingWeapon =& $WeaponResults['Weapon'];
17
-		$ShotHit =& $WeaponResults['Hit'];
18
-		$ActualDamage =& $WeaponResults['ActualDamage'];
19
-		$WeaponDamage =& $WeaponResults['WeaponDamage'];
20
-		$TargetPlayer =& $WeaponResults['TargetPlayer'];
14
+if (isset($PlanetCombatResults['Weapons']) && is_array($PlanetCombatResults['Weapons'])) {
15
+	foreach ($PlanetCombatResults['Weapons'] as $WeaponResults) {
16
+		$ShootingWeapon = & $WeaponResults['Weapon'];
17
+		$ShotHit = & $WeaponResults['Hit'];
18
+		$ActualDamage = & $WeaponResults['ActualDamage'];
19
+		$WeaponDamage = & $WeaponResults['WeaponDamage'];
20
+		$TargetPlayer = & $WeaponResults['TargetPlayer'];
21 21
 		
22
-		echo $CombatPlanet->getDisplayName() ?> fires a <?php echo $ShootingWeapon->getName(); ?> at <?php if($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?> the debris that was once <?php } echo $TargetPlayer->getDisplayName();
22
+		echo $CombatPlanet->getDisplayName() ?> fires a <?php echo $ShootingWeapon->getName(); ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?> the debris that was once <?php } echo $TargetPlayer->getDisplayName();
23 23
 		if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) {
24
-			if(!$ShotHit) {
24
+			if (!$ShotHit) {
25 25
 				?> and misses<?php
26 26
 			}
27
-			else if($ActualDamage['TotalDamage'] == 0) {
28
-				if($WeaponDamage['Shield'] > 0) {
29
-					if($ActualDamage['HasCDs']) {
27
+			else if ($ActualDamage['TotalDamage'] == 0) {
28
+				if ($WeaponDamage['Shield'] > 0) {
29
+					if ($ActualDamage['HasCDs']) {
30 30
 						?> which proves ineffective against their combat drones<?php
31 31
 					}
32 32
 					else {
33 33
 						?> which washes harmlessly over their hull<?php
34 34
 					}
35 35
 				}
36
-				else if($WeaponDamage['Armour'] > 0) {
36
+				else if ($WeaponDamage['Armour'] > 0) {
37 37
 					?> which is deflected by their shields<?php
38 38
 				}
39 39
 				else {
@@ -43,56 +43,56 @@  discard block
 block discarded – undo
43 43
 			else {
44 44
 				?> destroying <?php
45 45
 				$DamageTypes = 0;
46
-				if($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
47
-				if($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
48
-				if($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
46
+				if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
47
+				if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
48
+				if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
49 49
 
50
-				if($ActualDamage['Shield'] > 0) {
50
+				if ($ActualDamage['Shield'] > 0) {
51 51
 					?><span class="shields"><?php echo number_format($ActualDamage['Shield']); ?></span> shields<?php
52 52
 					$this->doDamageTypeReductionDisplay($DamageTypes);
53 53
 				}
54
-				if($ActualDamage['NumCDs'] > 0) {
54
+				if ($ActualDamage['NumCDs'] > 0) {
55 55
 					?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']); ?></span> combat drones<?php
56 56
 					$this->doDamageTypeReductionDisplay($DamageTypes);
57 57
 				}
58
-				if($ActualDamage['Armour'] > 0) {
58
+				if ($ActualDamage['Armour'] > 0) {
59 59
 					?><span class="red"><?php echo number_format($ActualDamage['Armour']); ?></span> plates of armour<?php
60 60
 				}
61 61
 			}
62 62
 		} ?>.
63 63
 		<br /><?php
64 64
 		if ($ShotHit && $ActualDamage['KillingShot']) {
65
-			$this->includeTemplate('includes/TraderCombatKillMessage.inc',array('KillResults'=>$WeaponResults['KillResults'],'TargetPlayer'=>$TargetPlayer));
65
+			$this->includeTemplate('includes/TraderCombatKillMessage.inc', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPlayer'=>$TargetPlayer));
66 66
 		}
67 67
 	}
68 68
 }
69
-if(isset($PlanetCombatResults['Drones'])) {
70
-	$Drones =& $PlanetCombatResults['Drones'];
71
-	$ActualDamage =& $Drones['ActualDamage'];
72
-	$WeaponDamage =& $Drones['WeaponDamage'];
73
-	$TargetPlayer =& $Drones['TargetPlayer'];
69
+if (isset($PlanetCombatResults['Drones'])) {
70
+	$Drones = & $PlanetCombatResults['Drones'];
71
+	$ActualDamage = & $Drones['ActualDamage'];
72
+	$WeaponDamage = & $Drones['WeaponDamage'];
73
+	$TargetPlayer = & $Drones['TargetPlayer'];
74 74
 	$DamageTypes = 0;
75
-	if($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
76
-	if($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
77
-	if($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
75
+	if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
76
+	if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
77
+	if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
78 78
 	
79 79
 	echo $CombatPlanet->getDisplayName();
80
-	if($WeaponDamage['Launched'] == 0) {
80
+	if ($WeaponDamage['Launched'] == 0) {
81 81
 		?> fails to launch it's combat drones<?php
82 82
 	}
83 83
 	else {
84
-		?> 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();
85
-		if(!$ActualDamage['TargetAlreadyDead']) {
86
-			if($ActualDamage['TotalDamage'] == 0) {
87
-				if($WeaponDamage['Shield'] > 0) {
88
-					if($ActualDamage['HasCDs']) {
84
+		?> 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();
85
+		if (!$ActualDamage['TargetAlreadyDead']) {
86
+			if ($ActualDamage['TotalDamage'] == 0) {
87
+				if ($WeaponDamage['Shield'] > 0) {
88
+					if ($ActualDamage['HasCDs']) {
89 89
 						?> which prove ineffective against their combat drones<?php
90 90
 					}
91 91
 					else {
92 92
 						?> which washes harmlessly over their hull<?php
93 93
 					}
94 94
 				}
95
-				else if($WeaponDamage['Armour'] > 0) {
95
+				else if ($WeaponDamage['Armour'] > 0) {
96 96
 					?> which is deflected by their shields<?php
97 97
 				}
98 98
 				else {
@@ -101,28 +101,28 @@  discard block
 block discarded – undo
101 101
 			}
102 102
 			else {
103 103
 				?> destroying <?php
104
-				if($ActualDamage['Shield'] > 0) {
104
+				if ($ActualDamage['Shield'] > 0) {
105 105
 					?><span class="shields"><?php echo number_format($ActualDamage['Shield']); ?></span> shields<?php
106 106
 					$this->doDamageTypeReductionDisplay($DamageTypes);
107 107
 				}
108
-				if($ActualDamage['NumCDs'] > 0) {
108
+				if ($ActualDamage['NumCDs'] > 0) {
109 109
 					?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']); ?></span> combat drones<?php
110 110
 					$this->doDamageTypeReductionDisplay($DamageTypes);
111 111
 				}
112
-				if($ActualDamage['Armour'] > 0) {
112
+				if ($ActualDamage['Armour'] > 0) {
113 113
 					?><span class="red"><?php echo number_format($ActualDamage['Armour']); ?></span> plates of armour<?php
114 114
 				}
115 115
 			}
116 116
 		}
117 117
 	} ?>.
118 118
 	<br /><?php
119
-	if($ActualDamage['KillingShot']) {
120
-		$this->includeTemplate('includes/TraderCombatKillMessage.inc',array('KillResults'=>$Drones['KillResults'],'TargetPlayer'=>$TargetPlayer));
119
+	if ($ActualDamage['KillingShot']) {
120
+		$this->includeTemplate('includes/TraderCombatKillMessage.inc', array('KillResults'=>$Drones['KillResults'], 'TargetPlayer'=>$TargetPlayer));
121 121
 	}
122 122
 }
123 123
 
124 124
 echo $CombatPlanet->getDisplayName();
125
-if($TotalDamage > 0) {
125
+if ($TotalDamage > 0) {
126 126
 	?> hit for a total of <span class="red"><?php echo $TotalDamage; ?></span> damage in this round of combat<?php
127 127
 }
128 128
 else {
Please login to merge, or discard this patch.
templates/Default/engine/Default/includes/TraderTeamCombatResults.inc 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -1,36 +1,36 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(is_array($TraderTeamCombatResults['Traders'])) {
3
-	foreach($TraderTeamCombatResults['Traders'] as $AccountID => $TraderResults) {
4
-		$ShootingPlayer =& $TraderResults['Player'];
5
-		$TotalDamage =& $TraderResults['TotalDamage'];
2
+if (is_array($TraderTeamCombatResults['Traders'])) {
3
+	foreach ($TraderTeamCombatResults['Traders'] as $AccountID => $TraderResults) {
4
+		$ShootingPlayer = & $TraderResults['Player'];
5
+		$TotalDamage = & $TraderResults['TotalDamage'];
6 6
 	
7
-		if($TraderResults['DeadBeforeShot']) {
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 18
 					echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at <?php
19
-					if($ShotHit && $ActualDamage['TargetAlreadyDead']) {
19
+					if ($ShotHit && $ActualDamage['TargetAlreadyDead']) {
20 20
 						?>the debris that was once <?php
21 21
 					}
22 22
 					echo $TargetPlayer->getDisplayName();
23 23
 					if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) {
24
-						if(!$ShotHit) {
24
+						if (!$ShotHit) {
25 25
 							?> and misses<?php
26
-						} else if($ActualDamage['TotalDamage'] == 0) {
27
-							if($WeaponDamage['Shield'] > 0) {
28
-								if($ActualDamage['HasCDs']) {
26
+						} else if ($ActualDamage['TotalDamage'] == 0) {
27
+							if ($WeaponDamage['Shield'] > 0) {
28
+								if ($ActualDamage['HasCDs']) {
29 29
 									?> which proves ineffective against their combat drones<?php
30 30
 								} else {
31 31
 									?> which washes harmlessly over their hull<?php
32 32
 								}
33
-							} else if($WeaponDamage['Armour'] > 0) {
33
+							} else if ($WeaponDamage['Armour'] > 0) {
34 34
 								?> which is deflected by their shields<?php
35 35
 							} else {
36 36
 								?> but it cannot do any damage<?php
@@ -38,94 +38,94 @@  discard block
 block discarded – undo
38 38
 						} else {
39 39
 							?> destroying <?php
40 40
 							$DamageTypes = 0;
41
-							if($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
42
-							if($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
43
-							if($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
41
+							if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
42
+							if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
43
+							if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
44 44
 
45
-							if($ActualDamage['Shield'] > 0) {
45
+							if ($ActualDamage['Shield'] > 0) {
46 46
 								?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php
47 47
 								$this->doDamageTypeReductionDisplay($DamageTypes);
48 48
 							}
49
-							if($ActualDamage['NumCDs'] > 0) {
49
+							if ($ActualDamage['NumCDs'] > 0) {
50 50
 								?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']) ?></span> combat drones<?php
51 51
 								$this->doDamageTypeReductionDisplay($DamageTypes);
52 52
 							}
53
-							if($ActualDamage['Armour'] > 0) {
53
+							if ($ActualDamage['Armour'] > 0) {
54 54
 								?><span class="red"><?php echo number_format($ActualDamage['Armour']) ?></span> plates of armour<?php
55 55
 							}
56 56
 						}
57 57
 					} ?>.
58 58
 					<br /><?php
59 59
 					if ($ShotHit && $ActualDamage['KillingShot']) {
60
-						$this->includeTemplate('includes/TraderCombatKillMessage.inc',array('KillResults'=>$WeaponResults['KillResults'],'TargetPlayer'=>$TargetPlayer,'ShootingPlayer'=>$ShootingPlayer));
60
+						$this->includeTemplate('includes/TraderCombatKillMessage.inc', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPlayer'=>$TargetPlayer, 'ShootingPlayer'=>$ShootingPlayer));
61 61
 					}
62 62
 				}
63 63
 			}
64
-			if(isset($TraderResults['Drones'])) {
65
-				$Drones =& $TraderResults['Drones'];
66
-				$ActualDamage =& $Drones['ActualDamage'];
67
-				$WeaponDamage =& $Drones['WeaponDamage'];
68
-				$TargetPlayer =& $Drones['TargetPlayer'];
64
+			if (isset($TraderResults['Drones'])) {
65
+				$Drones = & $TraderResults['Drones'];
66
+				$ActualDamage = & $Drones['ActualDamage'];
67
+				$WeaponDamage = & $Drones['WeaponDamage'];
68
+				$TargetPlayer = & $Drones['TargetPlayer'];
69 69
 				$DamageTypes = 0;
70
-				if($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
71
-				if($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
72
-				if($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
70
+				if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
71
+				if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
72
+				if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
73 73
 	
74 74
 				echo $ShootingPlayer->getDisplayName();
75
-				if($WeaponDamage['Launched'] == 0) {
75
+				if ($WeaponDamage['Launched'] == 0) {
76 76
 					?> fails to launch their combat drones<?php
77 77
 				} else {
78 78
 					?> launches <span class="cds"><?php echo $WeaponDamage['Launched'] ?></span> combat drones at <?php
79
-					if($ActualDamage['TargetAlreadyDead']) {
79
+					if ($ActualDamage['TargetAlreadyDead']) {
80 80
 						?>the debris that was once <?php
81 81
 					}
82 82
 					echo $TargetPlayer->getDisplayName();
83
-					if(!$ActualDamage['TargetAlreadyDead']) {
84
-						if($ActualDamage['TotalDamage'] == 0) {
85
-							if($WeaponDamage['Shield'] > 0) {
86
-								if($ActualDamage['HasCDs']) {
83
+					if (!$ActualDamage['TargetAlreadyDead']) {
84
+						if ($ActualDamage['TotalDamage'] == 0) {
85
+							if ($WeaponDamage['Shield'] > 0) {
86
+								if ($ActualDamage['HasCDs']) {
87 87
 									?> which prove ineffective against their combat drones<?php
88 88
 								} else {
89 89
 									?> which washes harmlessly over their hull<?php
90 90
 								}
91 91
 							}
92
-							if($ActualDamage['Armour'] > 0) {
92
+							if ($ActualDamage['Armour'] > 0) {
93 93
 								?> which is deflected by their shields<?php
94 94
 							} else {
95 95
 								?> but they cannot do any damage<?php
96 96
 							}
97 97
 						} else {
98 98
 							?> destroying <?php
99
-							if($ActualDamage['Shield'] > 0) {
99
+							if ($ActualDamage['Shield'] > 0) {
100 100
 								?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php
101 101
 								$this->doDamageTypeReductionDisplay($DamageTypes);
102 102
 							}
103
-							if($ActualDamage['NumCDs'] > 0) {
103
+							if ($ActualDamage['NumCDs'] > 0) {
104 104
 								?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']) ?></span> combat drones<?php
105 105
 								$this->doDamageTypeReductionDisplay($DamageTypes);
106 106
 							}
107
-							if($ActualDamage['Armour'] > 0) {
107
+							if ($ActualDamage['Armour'] > 0) {
108 108
 								?><span class="red"><?php echo number_format($ActualDamage['Armour']) ?></span> plates of armour<?php
109 109
 							}
110 110
 						}
111 111
 					}
112 112
 				} ?>.
113 113
 				<br /><?php
114
-				if($ActualDamage['KillingShot']) {
115
-					$this->includeTemplate('includes/TraderCombatKillMessage.inc',array('KillResults'=>$Drones['KillResults'],'TargetPlayer'=>$TargetPlayer,'ShootingPlayer'=>$ShootingPlayer));
114
+				if ($ActualDamage['KillingShot']) {
115
+					$this->includeTemplate('includes/TraderCombatKillMessage.inc', array('KillResults'=>$Drones['KillResults'], 'TargetPlayer'=>$TargetPlayer, 'ShootingPlayer'=>$ShootingPlayer));
116 116
 				}
117 117
 			}
118 118
 		}
119 119
 		echo $ShootingPlayer->getDisplayName();
120
-		if($TotalDamage > 0) {
120
+		if ($TotalDamage > 0) {
121 121
 			?> hits for a total of <span class="red"><?php echo $TotalDamage ?></span> damage in this round of combat<?php
122 122
 		} else {
123 123
 			?> does no damage this round.<?php
124
-			if(!$TraderResults['DeadBeforeShot']) {
124
+			if (!$TraderResults['DeadBeforeShot']) {
125 125
 				?> Maybe they should go back to the academy<?php
126 126
 			}
127 127
 		} ?>.<br /><br /><?php
128 128
 	}
129 129
 }
130 130
 $TotalDamage = $TraderTeamCombatResults['TotalDamage']; ?>
131
-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 } ?>.<br />
131
+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 } ?>.<br />
Please login to merge, or discard this patch.
lib/Default/SmrMines.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 			$return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
95 95
 			return $return;
96 96
 		}
97
-		$damage =& $this->getModifiedDamage();
97
+		$damage = & $this->getModifiedDamage();
98 98
 		if ($targetPlayer->getShip()->isFederal()) { // do less damage to fed ships 
99 99
 			$damage['MaxDamage'] = IRound($damage['MaxDamage'] * self::FED_SHIP_DAMAGE_MODIFIER);
100 100
 			$damage['Shield'] = IRound($damage['Shield'] * self::FED_SHIP_DAMAGE_MODIFIER);
@@ -131,12 +131,12 @@  discard block
 block discarded – undo
131 131
 	}
132 132
 	
133 133
 	protected function &doForceDamageToPlayer(array &$return, SmrForce $forces, AbstractSmrPlayer $targetPlayer, $minesAreAttacker = false) {
134
-		$return['WeaponDamage'] =& $this->getModifiedForceDamageAgainstPlayer($forces, $targetPlayer, $minesAreAttacker);
135
-		$return['ActualDamage'] =& $targetPlayer->getShip()->doMinesDamage($return['WeaponDamage']);
134
+		$return['WeaponDamage'] = & $this->getModifiedForceDamageAgainstPlayer($forces, $targetPlayer, $minesAreAttacker);
135
+		$return['ActualDamage'] = & $targetPlayer->getShip()->doMinesDamage($return['WeaponDamage']);
136 136
 		$return['ActualDamage']['Launched'] = ICeil($return['WeaponDamage']['Launched'] * $return['ActualDamage']['TotalDamage'] / $return['WeaponDamage']['MaxDamage']);
137 137
 
138 138
 		if ($return['ActualDamage']['KillingShot']) {
139
-			$return['KillResults'] =& $targetPlayer->killPlayerByForces($forces);
139
+			$return['KillResults'] = & $targetPlayer->killPlayerByForces($forces);
140 140
 		}
141 141
 		return $return;
142 142
 	}
Please login to merge, or discard this patch.
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.