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
Pull Request — master (#1006)
by Dan
15:04
created
src/lib/Default/DummyShip.class.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	}
17 17
 
18 18
 	protected function doFullUNO() {
19
-		foreach($this->getMaxHardware() as $hardwareTypeID => $max) {
19
+		foreach ($this->getMaxHardware() as $hardwareTypeID => $max) {
20 20
 			$this->hardware[$hardwareTypeID] = $max;
21 21
 			$this->oldHardware[$hardwareTypeID] = $max;
22 22
 		}
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 	}
47 47
 
48 48
 	public function getIllusionShip() {
49
-		if(!isset($this->illusionShip)) {
50
-			$this->illusionShip=false;
49
+		if (!isset($this->illusionShip)) {
50
+			$this->illusionShip = false;
51 51
 		}
52 52
 		return $this->illusionShip;
53 53
 	}
@@ -57,20 +57,20 @@  discard block
 block discarded – undo
57 57
 		$db = MySqlDatabase::getInstance();
58 58
 		$db->query('REPLACE INTO cached_dummys ' .
59 59
 					'(type, id, info) ' .
60
-					'VALUES (\'DummyShip\', '.$db->escapeString($this->getPlayer()->getPlayerName()).', '.$db->escapeString($cache).')');
60
+					'VALUES (\'DummyShip\', ' . $db->escapeString($this->getPlayer()->getPlayerName()) . ', ' . $db->escapeString($cache) . ')');
61 61
 		unserialize($cache);
62 62
 	}
63 63
 
64 64
 	public static function getCachedDummyShip(AbstractSmrPlayer $player) {
65
-		if(!isset(self::$CACHED_DUMMY_SHIPS[$player->getPlayerName()])) {
65
+		if (!isset(self::$CACHED_DUMMY_SHIPS[$player->getPlayerName()])) {
66 66
 			$db = MySqlDatabase::getInstance();
67 67
 			$db->query('SELECT info FROM cached_dummys
68 68
 						WHERE type = \'DummyShip\'
69 69
 						AND id = ' . $db->escapeString($player->getPlayerName()) . ' LIMIT 1');
70
-			if($db->nextRecord()) {
70
+			if ($db->nextRecord()) {
71 71
 				$return = unserialize($db->getField('info'));
72 72
 				$return->regenerate($player);
73
-				self::$CACHED_DUMMY_SHIPS[$player->getPlayerName()] =& $return;
73
+				self::$CACHED_DUMMY_SHIPS[$player->getPlayerName()] = & $return;
74 74
 			} else {
75 75
 				self::$CACHED_DUMMY_SHIPS[$player->getPlayerName()] = new DummyShip($player);
76 76
 			}
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		$db->query('SELECT id FROM cached_dummys
84 84
 					WHERE type = \'DummyShip\'');
85 85
 		$dummyNames = array();
86
-		while($db->nextRecord()) {
86
+		while ($db->nextRecord()) {
87 87
 			$dummyNames[] = $db->getField('id');
88 88
 		}
89 89
 		return $dummyNames;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
 
94 94
 	public function __sleep() {
95
-		return array('gameID','weapons');
95
+		return array('gameID', 'weapons');
96 96
 	}
97 97
 
98 98
 	public function __wakeup() {
Please login to merge, or discard this patch.
src/lib/Default/AbstractSmrCombatWeapon.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	abstract public function getModifiedPlanetDamageAgainstPlayer(SmrPlanet $planet, AbstractSmrPlayer $targetPlayer);
68 68
 
69 69
 	protected function doPlayerDamageToForce(array $return, AbstractSmrPlayer $weaponPlayer, SmrForce $forces) {
70
-		$return['WeaponDamage'] = $this->getModifiedDamageAgainstForces($weaponPlayer,$forces);
70
+		$return['WeaponDamage'] = $this->getModifiedDamageAgainstForces($weaponPlayer, $forces);
71 71
 		$return['ActualDamage'] = $forces->doWeaponDamage($return['WeaponDamage']);
72 72
 		if ($return['ActualDamage']['KillingShot']) {
73 73
 			$return['KillResults'] = $forces->killForcesByPlayer($weaponPlayer);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	}
77 77
 
78 78
 	protected function doPlayerDamageToPlayer(array $return, AbstractSmrPlayer $weaponPlayer, AbstractSmrPlayer $targetPlayer) {
79
-		$return['WeaponDamage'] = $this->getModifiedDamageAgainstPlayer($weaponPlayer,$targetPlayer);
79
+		$return['WeaponDamage'] = $this->getModifiedDamageAgainstPlayer($weaponPlayer, $targetPlayer);
80 80
 		$return['ActualDamage'] = $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']);
81 81
 
82 82
 		if ($return['ActualDamage']['KillingShot']) {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	}
87 87
 
88 88
 	protected function doPlayerDamageToPort(array $return, AbstractSmrPlayer $weaponPlayer, SmrPort $port) {
89
-		$return['WeaponDamage'] = $this->getModifiedDamageAgainstPort($weaponPlayer,$port);
89
+		$return['WeaponDamage'] = $this->getModifiedDamageAgainstPort($weaponPlayer, $port);
90 90
 		$return['ActualDamage'] = $port->doWeaponDamage($return['WeaponDamage']);
91 91
 		if ($return['ActualDamage']['KillingShot']) {
92 92
 			$return['KillResults'] = $port->killPortByPlayer($weaponPlayer);
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
 	}
96 96
 
97 97
 	protected function doPlayerDamageToPlanet(array $return, AbstractSmrPlayer $weaponPlayer, SmrPlanet $planet, $delayed) {
98
-		$return['WeaponDamage'] = $this->getModifiedDamageAgainstPlanet($weaponPlayer,$planet);
99
-		$return['ActualDamage'] = $planet->doWeaponDamage($return['WeaponDamage'],$delayed);
98
+		$return['WeaponDamage'] = $this->getModifiedDamageAgainstPlanet($weaponPlayer, $planet);
99
+		$return['ActualDamage'] = $planet->doWeaponDamage($return['WeaponDamage'], $delayed);
100 100
 		if ($return['ActualDamage']['KillingShot']) {
101 101
 			$return['KillResults'] = $planet->killPlanetByPlayer($weaponPlayer);
102 102
 		}
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	}
105 105
 
106 106
 	protected function doPortDamageToPlayer(array $return, SmrPort $port, AbstractSmrPlayer $targetPlayer) {
107
-		$return['WeaponDamage'] = $this->getModifiedPortDamageAgainstPlayer($port,$targetPlayer);
107
+		$return['WeaponDamage'] = $this->getModifiedPortDamageAgainstPlayer($port, $targetPlayer);
108 108
 		$return['ActualDamage'] = $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']);
109 109
 
110 110
 		if ($return['ActualDamage']['KillingShot']) {
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	}
115 115
 
116 116
 	protected function doPlanetDamageToPlayer(array $return, SmrPlanet $planet, AbstractSmrPlayer $targetPlayer) {
117
-		$return['WeaponDamage'] = $this->getModifiedPlanetDamageAgainstPlayer($planet,$targetPlayer);
117
+		$return['WeaponDamage'] = $this->getModifiedPlanetDamageAgainstPlayer($planet, $targetPlayer);
118 118
 		$return['ActualDamage'] = $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']);
119 119
 
120 120
 		if ($return['ActualDamage']['KillingShot']) {
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	}
125 125
 
126 126
 	protected function doForceDamageToPlayer(array $return, SmrForce $forces, AbstractSmrPlayer $targetPlayer) {
127
-		$return['WeaponDamage'] = $this->getModifiedForceDamageAgainstPlayer($forces,$targetPlayer);
127
+		$return['WeaponDamage'] = $this->getModifiedForceDamageAgainstPlayer($forces, $targetPlayer);
128 128
 		$return['ActualDamage'] = $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']);
129 129
 
130 130
 		if ($return['ActualDamage']['KillingShot']) {
Please login to merge, or discard this patch.
src/lib/Default/AbstractSmrShip.class.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -924,14 +924,14 @@
 block discarded – undo
924 924
 
925 925
 	public function isFederal() {
926 926
 		return $this->getShipTypeID() == SHIP_TYPE_FEDERAL_DISCOVERY ||
927
-		       $this->getShipTypeID() == SHIP_TYPE_FEDERAL_WARRANT ||
928
-		       $this->getShipTypeID() == SHIP_TYPE_FEDERAL_ULTIMATUM;
927
+			   $this->getShipTypeID() == SHIP_TYPE_FEDERAL_WARRANT ||
928
+			   $this->getShipTypeID() == SHIP_TYPE_FEDERAL_ULTIMATUM;
929 929
 	}
930 930
 
931 931
 	public function isUnderground() {
932 932
 		return $this->getShipTypeID() == SHIP_TYPE_THIEF ||
933
-		       $this->getShipTypeID() == SHIP_TYPE_ASSASSIN ||
934
-		       $this->getShipTypeID() == SHIP_TYPE_DEATH_CRUISER;
933
+			   $this->getShipTypeID() == SHIP_TYPE_ASSASSIN ||
934
+			   $this->getShipTypeID() == SHIP_TYPE_DEATH_CRUISER;
935 935
 	}
936 936
 
937 937
 	public function shootPlayers(array $targetPlayers) {
Please login to merge, or discard this patch.
Default/engine/Default/includes/ForceTraderTeamCombatResults.inc.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -16,24 +16,24 @@  discard block
 block discarded – undo
16 16
 						$WeaponDamage = $WeaponResults['WeaponDamage'];
17 17
 					}
18 18
 
19
-					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
+					echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at<?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?> the debris that was once<?php } ?> the forces<?php
20 20
 					if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) {
21 21
 						if (!$ShotHit) {
22 22
 							?> and misses<?php
23 23
 						} elseif ($ActualDamage['TotalDamage'] == 0) {
24 24
 							if ($WeaponDamage['Shield'] > 0) {
25
-								?> which proves ineffective against the <?php if ($ActualDamage['HasMines']){ ?>mines<?php } elseif ($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php }
25
+								?> which proves ineffective against the <?php if ($ActualDamage['HasMines']) { ?>mines<?php } elseif ($ActualDamage['HasCDs']) { ?>combat drones<?php } else { ?>scout drones<?php }
26 26
 							} elseif ($WeaponDamage['Armour'] > 0) {
27
-								?> which is deflected by the <?php if ($ActualDamage['HasMines']){ ?>mines<?php } elseif ($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php } ?> shields<?php
27
+								?> which is deflected by the <?php if ($ActualDamage['HasMines']) { ?>mines<?php } elseif ($ActualDamage['HasCDs']) { ?>combat drones<?php } else { ?>scout drones<?php } ?> shields<?php
28 28
 							} else {
29 29
 								?> but it cannot do any damage<?php
30 30
 							}
31 31
 						} else {
32 32
 							?> destroying <?php
33 33
 							$DamageTypes = 0;
34
-							if ($ActualDamage['NumMines'] > 0){ $DamageTypes = $DamageTypes+1; }
35
-							if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
36
-							if ($ActualDamage['NumSDs'] > 0){ $DamageTypes = $DamageTypes+1; }
34
+							if ($ActualDamage['NumMines'] > 0) { $DamageTypes = $DamageTypes + 1; }
35
+							if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
36
+							if ($ActualDamage['NumSDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
37 37
 
38 38
 							if ($ActualDamage['NumMines'] > 0) {
39 39
 								?><span class="red"><?php echo number_format($ActualDamage['NumMines']) ?></span> mines<?php
@@ -63,22 +63,22 @@  discard block
 block discarded – undo
63 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
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 67
 					if (!$ActualDamage['TargetAlreadyDead']) {
68 68
 						if ($ActualDamage['TotalDamage'] == 0) {
69 69
 							if ($WeaponDamage['Shield'] > 0) {
70
-								?> which prove ineffective against the <?php if ($ActualDamage['HasMines']){ ?>mines<?php } elseif ($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php }
70
+								?> which prove ineffective against the <?php if ($ActualDamage['HasMines']) { ?>mines<?php } elseif ($ActualDamage['HasCDs']) { ?>combat drones<?php } else { ?>scout drones<?php }
71 71
 							} elseif ($WeaponDamage['Armour'] > 0) {
72 72
 								?> which is deflected by the <?php
73
-								if ($ActualDamage['HasMines']){ ?>mines<?php } elseif ($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php } ?> shields<?php
73
+								if ($ActualDamage['HasMines']) { ?>mines<?php } elseif ($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 83
 							if ($WeaponDamage['Kamikaze'] == 0) {
84 84
 								?> destroying <?php
@@ -120,4 +120,4 @@  discard block
 block discarded – undo
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.
src/templates/Default/engine/Default/includes/ForcesCombatResults.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 			?> scout drones kamikaze themselves against <?php
17 17
 		}
18 18
 
19
-		if ($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?> the debris that was once <?php }
19
+		if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?> the debris that was once <?php }
20 20
 		echo $TargetPlayer->getDisplayName();
21 21
 		if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) {
22 22
 			if (!$ShotHit) {
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
 				?> destroying <?php
38 38
 			}
39 39
 			$DamageTypes = 0;
40
-			if ($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
41
-			if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
42
-			if ($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
40
+			if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
41
+			if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
42
+			if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
43 43
 
44 44
 			if ($ActualDamage['Shield'] > 0) {
45 45
 				?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		} ?>.
56 56
 		<br /><?php
57 57
 		if ($ShotHit && $ActualDamage['KillingShot']) {
58
-			$this->includeTemplate('includes/TraderCombatKillMessage.inc.php',array('KillResults'=>$ForceResults['KillResults'],'TargetPlayer'=>$TargetPlayer));
58
+			$this->includeTemplate('includes/TraderCombatKillMessage.inc.php', array('KillResults'=>$ForceResults['KillResults'], 'TargetPlayer'=>$TargetPlayer));
59 59
 		}
60 60
 	}
61 61
 }
@@ -64,4 +64,4 @@  discard block
 block discarded – undo
64 64
 }
65 65
 
66 66
 $TotalDamage = $ForcesCombatResults['TotalDamage'] ?>
67
-The forces <?php if ($TotalDamage > 0){ ?>hit for a total of <span class="red"><?php echo number_format($TotalDamage) ?></span> damage in this round of combat<?php } else{ ?>do no damage this round<?php } ?>.
67
+The forces <?php if ($TotalDamage > 0) { ?>hit for a total of <span class="red"><?php echo number_format($TotalDamage) ?></span> damage in this round of combat<?php } else { ?>do no damage this round<?php } ?>.
Please login to merge, or discard this patch.
Default/engine/Default/includes/PortTraderTeamCombatResults.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 				}
26 26
 				$TargetPort = $WeaponResults['TargetPort'];
27 27
 
28
-				echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?>the remnants of <?php } echo $TargetPort->getDisplayName();
28
+				echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?>the remnants of <?php } echo $TargetPort->getDisplayName();
29 29
 				if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) {
30 30
 					if (!$ShotHit) {
31 31
 						?> and misses every critical system<?php
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 					} else {
45 45
 						?> destroying <?php
46 46
 						$DamageTypes = 0;
47
-						if ($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
48
-						if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
49
-						if ($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
47
+						if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
48
+						if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
49
+						if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
50 50
 
51 51
 						if ($ActualDamage['Shield'] > 0) {
52 52
 							?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 				} ?>.
64 64
 				<br /><?php
65 65
 				if ($ShotHit && $ActualDamage['KillingShot']) {
66
-					$this->includeTemplate('includes/PortKillMessage.inc.php',array('KillResults'=>$WeaponResults['KillResults'],'TargetPort'=>$TargetPort,'ShootingPlayer'=>$ShootingPlayer));
66
+					$this->includeTemplate('includes/PortKillMessage.inc.php', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPort'=>$TargetPort, 'ShootingPlayer'=>$ShootingPlayer));
67 67
 				}
68 68
 			}
69 69
 		}
Please login to merge, or discard this patch.
src/templates/Default/engine/Default/includes/PortCombatResults.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 		}
21 21
 		$TargetPlayer = $WeaponResults['TargetPlayer'];
22 22
 
23
-		echo $CombatPort->getDisplayName() ?> fires an <?php echo $ShootingWeapon->getName() ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?> the debris that was once <?php } echo $TargetPlayer->getDisplayName();
23
+		echo $CombatPort->getDisplayName() ?> fires an <?php echo $ShootingWeapon->getName() ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?> the debris that was once <?php } echo $TargetPlayer->getDisplayName();
24 24
 		if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) {
25 25
 			if (!$ShotHit) {
26 26
 				?> and misses<?php
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 			} else {
40 40
 				?> destroying <?php
41 41
 				$DamageTypes = 0;
42
-				if ($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
43
-				if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
44
-				if ($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
42
+				if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
43
+				if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
44
+				if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
45 45
 
46 46
 				if ($ActualDamage['Shield'] > 0) {
47 47
 					?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 		} ?>.
59 59
 		<br /><?php
60 60
 		if ($ShotHit && $ActualDamage['KillingShot']) {
61
-			$this->includeTemplate('includes/TraderCombatKillMessage.inc.php',array('KillResults'=>$WeaponResults['KillResults'],'TargetPlayer'=>$TargetPlayer));
61
+			$this->includeTemplate('includes/TraderCombatKillMessage.inc.php', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPlayer'=>$TargetPlayer));
62 62
 		}
63 63
 	}
64 64
 }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	if ($WeaponDamage['Launched'] == 0) {
73 73
 		?> fails to launch it's combat drones<?php
74 74
 	} else {
75
-		?> 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();
75
+		?> 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();
76 76
 		if (!$ActualDamage['TargetAlreadyDead']) {
77 77
 			if ($ActualDamage['TotalDamage'] == 0) {
78 78
 				if ($WeaponDamage['Shield'] > 0) {
Please login to merge, or discard this patch.
Default/engine/Default/includes/PlanetTraderTeamCombatResults.inc.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 				}
26 26
 				$TargetPlanet = $WeaponResults['TargetPlanet'];
27 27
 
28
-				echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?>the debris that was once <?php } echo $TargetPlanet->getCombatName();
28
+				echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?>the debris that was once <?php } echo $TargetPlanet->getCombatName();
29 29
 				if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) {
30 30
 					if (!$ShotHit) {
31 31
 						?> and misses<?php
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 					} else {
45 45
 						?> destroying <?php
46 46
 						$DamageTypes = 0;
47
-						if ($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
48
-						if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
49
-						if ($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
47
+						if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
48
+						if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
49
+						if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
50 50
 
51 51
 						if ($ActualDamage['Shield'] > 0) {
52 52
 							?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 				} ?>.
64 64
 				<br /><?php
65 65
 				if ($ShotHit && $ActualDamage['KillingShot']) {
66
-					$this->includeTemplate('includes/PlanetKillMessage.inc.php',array('KillResults'=>$WeaponResults['KillResults'],'TargetPlanet'=>$TargetPlanet));
66
+					$this->includeTemplate('includes/PlanetKillMessage.inc.php', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPlanet'=>$TargetPlanet));
67 67
 				}
68 68
 			}
69 69
 		}
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
 			$WeaponDamage = $Drones['WeaponDamage'];
74 74
 			$TargetPlanet = $Drones['TargetPlanet'];
75 75
 			$DamageTypes = 0;
76
-			if ($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
77
-			if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
78
-			if ($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
76
+			if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
77
+			if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
78
+			if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
79 79
 
80 80
 			echo $ShootingPlayer->getDisplayName();
81 81
 			if ($WeaponDamage['Launched'] == 0) {
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 			} ?>.
119 119
 			<br /><?php
120 120
 			if ($ActualDamage['KillingShot']) {
121
-				$this->includeTemplate('includes/PlanetKillMessage.inc.php',array('KillResults'=>$Drones['KillResults'],'TargetPlanet'=>$TargetPlanet));
121
+				$this->includeTemplate('includes/PlanetKillMessage.inc.php', array('KillResults'=>$Drones['KillResults'], 'TargetPlanet'=>$TargetPlanet));
122 122
 			}
123 123
 		}
124 124
 	}
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	} ?>.<br /><br /><?php
134 134
 }
135 135
 $TotalDamage = $TraderTeamCombatResults['TotalDamage']; ?>
136
-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
136
+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
137 137
 foreach ($TraderTeamCombatResults['Downgrades'] as $structureID => $numDestroyed) { ?>
138 138
 	This team destroys <span class="red"><?php echo $numDestroyed; ?> </span><?php echo pluralise((new SmrPlanetStructureType($structureID, []))->name(), $numDestroyed); ?>.<br /><?php
139 139
 } ?>
Please login to merge, or discard this patch.
src/templates/Default/engine/Default/includes/PlanetCombatResults.inc.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 		}
21 21
 		$TargetPlayer = $WeaponResults['TargetPlayer'];
22 22
 
23
-		echo $CombatPlanet->getCombatName() ?> fires a <?php echo $ShootingWeapon->getName(); ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?> the debris that was once <?php } echo $TargetPlayer->getDisplayName();
23
+		echo $CombatPlanet->getCombatName() ?> fires a <?php echo $ShootingWeapon->getName(); ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?> the debris that was once <?php } echo $TargetPlayer->getDisplayName();
24 24
 		if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) {
25 25
 			if (!$ShotHit) {
26 26
 				?> and misses<?php
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 			} else {
40 40
 				?> destroying <?php
41 41
 				$DamageTypes = 0;
42
-				if ($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
43
-				if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
44
-				if ($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
42
+				if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
43
+				if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
44
+				if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
45 45
 
46 46
 				if ($ActualDamage['Shield'] > 0) {
47 47
 					?><span class="shields"><?php echo number_format($ActualDamage['Shield']); ?></span> shields<?php
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 		} ?>.
59 59
 		<br /><?php
60 60
 		if ($ShotHit && $ActualDamage['KillingShot']) {
61
-			$this->includeTemplate('includes/TraderCombatKillMessage.inc.php',array('KillResults'=>$WeaponResults['KillResults'],'TargetPlayer'=>$TargetPlayer));
61
+			$this->includeTemplate('includes/TraderCombatKillMessage.inc.php', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPlayer'=>$TargetPlayer));
62 62
 		}
63 63
 	}
64 64
 }
@@ -68,15 +68,15 @@  discard block
 block discarded – undo
68 68
 	$WeaponDamage = $Drones['WeaponDamage'];
69 69
 	$TargetPlayer = $Drones['TargetPlayer'];
70 70
 	$DamageTypes = 0;
71
-	if ($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
72
-	if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
73
-	if ($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
71
+	if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
72
+	if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
73
+	if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
74 74
 
75 75
 	echo $CombatPlanet->getCombatName();
76 76
 	if ($WeaponDamage['Launched'] == 0) {
77 77
 		?> fails to launch it's combat drones<?php
78 78
 	} else {
79
-		?> 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();
79
+		?> 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();
80 80
 		if (!$ActualDamage['TargetAlreadyDead']) {
81 81
 			if ($ActualDamage['TotalDamage'] == 0) {
82 82
 				if ($WeaponDamage['Shield'] > 0) {
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	} ?>.
109 109
 	<br /><?php
110 110
 	if ($ActualDamage['KillingShot']) {
111
-		$this->includeTemplate('includes/TraderCombatKillMessage.inc.php',array('KillResults'=>$Drones['KillResults'],'TargetPlayer'=>$TargetPlayer));
111
+		$this->includeTemplate('includes/TraderCombatKillMessage.inc.php', array('KillResults'=>$Drones['KillResults'], 'TargetPlayer'=>$TargetPlayer));
112 112
 	}
113 113
 }
114 114
 
Please login to merge, or discard this patch.