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 (#955)
by Dan
04:20
created
lib/Default/SocialLogins/Twitter.class.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 		}
36 36
 		$helper = self::getTwitterObj($_SESSION['TwitterToken']);
37 37
 		$accessToken = $helper->oauth('oauth/access_token',
38
-		                              ['oauth_verifier' => \Request::get('oauth_verifier')]);
38
+									  ['oauth_verifier' => \Request::get('oauth_verifier')]);
39 39
 		$auth = self::getTwitterObj($accessToken);
40 40
 		$userInfo = $auth->get('account/verify_credentials', ['include_email' => 'true']);
41 41
 		if ($auth->getLastHttpCode() == 200) {
Please login to merge, or discard this patch.
lib/Default/AbstractMenu.class.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -100,16 +100,16 @@
 block discarded – undo
100 100
 		$container['view_game_id'] = $var['view_game_id'];
101 101
 		$container['game_name'] = $var['game_name'];
102 102
 		$menuItems[] = ['Link' => SmrSession::getNewHREF($container),
103
-		                'Text' => 'Game Details'];
103
+						'Text' => 'Game Details'];
104 104
 		$container['body'] = 'history_games_detail.php';
105 105
 		$menuItems[] = ['Link' => SmrSession::getNewHREF($container),
106
-		                'Text' => 'Extended Stats'];
106
+						'Text' => 'Extended Stats'];
107 107
 		$container['body'] = 'history_games_hof.php';
108 108
 		$menuItems[] = ['Link' => SmrSession::getNewHREF($container),
109
-		                'Text' => 'Hall of Fame'];
109
+						'Text' => 'Hall of Fame'];
110 110
 		$container['body'] = 'history_games_news.php';
111 111
 		$menuItems[] = ['Link' => SmrSession::getNewHREF($container),
112
-		                'Text' => 'Game News'];
112
+						'Text' => 'Game News'];
113 113
 		// make the selected index bold
114 114
 		$boldItem =& $menuItems[$selected_index]['Text'];
115 115
 		$boldItem = '<b>' . $boldItem . '</b>';
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 		$menuItems[] = array('Link'=>Globals::getPlanetListHREF($alliance_id), 'Text'=>'Defense');
13 13
 		$menuItems[] = array('Link'=>Globals::getPlanetListFinancialHREF($alliance_id), 'Text'=>'Financial');
14 14
 		// make the selected index bold
15
-		$boldItem =& $menuItems[$selected_index]['Text'];
15
+		$boldItem = & $menuItems[$selected_index]['Text'];
16 16
 		$boldItem = '<span class="bold">' . $boldItem . '</span>';
17 17
 		$template->assign('MenuItems', $menuItems);
18 18
 	}
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		$menuItems[] = ['Link' => SmrSession::getNewHREF($container),
108 108
 		                'Text' => 'Game News'];
109 109
 		// make the selected index bold
110
-		$boldItem =& $menuItems[$selected_index]['Text'];
110
+		$boldItem = & $menuItems[$selected_index]['Text'];
111 111
 		$boldItem = '<b>' . $boldItem . '</b>';
112 112
 		$template->assign('MenuItems', $menuItems);
113 113
 	}
Please login to merge, or discard this patch.
htdocs/login_processing.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 			exit;
70 70
 		}
71 71
 		$account->addAuthMethod($_SESSION['socialLogin']->getLoginType(),
72
-		                        $_SESSION['socialLogin']->getUserID());
72
+								$_SESSION['socialLogin']->getUserID());
73 73
 		session_destroy();
74 74
 	}
75 75
 
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->getCombatName();
26
+				echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?>the debris that was once <?php } echo $TargetPlanet->getCombatName();
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->getCombatName();
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.
engine/Default/announcements.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 $announcements = [];
17 17
 while ($db->nextRecord()) {
18 18
 	$announcements[] = ['Time' => $db->getInt('time'),
19
-	                    'Msg' => htmlentities($db->getField('msg'))];
19
+						'Msg' => htmlentities($db->getField('msg'))];
20 20
 }
21 21
 $template->assign('Announcements', $announcements);
22 22
 
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,35 +1,35 @@  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->getCombatName();
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
 	} else {
9 9
 		?> does no damage this round<?php
10 10
 	} ?>. <?php echo $AttackLogLink;
11 11
 	return;
12 12
 }
13
-if(isset($PlanetCombatResults['Weapons']) && is_array($PlanetCombatResults['Weapons'])) {
14
-	foreach($PlanetCombatResults['Weapons'] as $WeaponResults) {
15
-		$ShootingWeapon =& $WeaponResults['Weapon'];
16
-		$ShotHit =& $WeaponResults['Hit'];
17
-		$ActualDamage =& $WeaponResults['ActualDamage'];
18
-		$WeaponDamage =& $WeaponResults['WeaponDamage'];
19
-		$TargetPlayer =& $WeaponResults['TargetPlayer'];
13
+if (isset($PlanetCombatResults['Weapons']) && is_array($PlanetCombatResults['Weapons'])) {
14
+	foreach ($PlanetCombatResults['Weapons'] as $WeaponResults) {
15
+		$ShootingWeapon = & $WeaponResults['Weapon'];
16
+		$ShotHit = & $WeaponResults['Hit'];
17
+		$ActualDamage = & $WeaponResults['ActualDamage'];
18
+		$WeaponDamage = & $WeaponResults['WeaponDamage'];
19
+		$TargetPlayer = & $WeaponResults['TargetPlayer'];
20 20
 		
21
-		echo $CombatPlanet->getCombatName() ?> fires a <?php echo $ShootingWeapon->getName(); ?> at <?php if($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?> the debris that was once <?php } echo $TargetPlayer->getDisplayName();
21
+		echo $CombatPlanet->getCombatName() ?> fires a <?php echo $ShootingWeapon->getName(); ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?> the debris that was once <?php } echo $TargetPlayer->getDisplayName();
22 22
 		if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) {
23
-			if(!$ShotHit) {
23
+			if (!$ShotHit) {
24 24
 				?> and misses<?php
25
-			} else if($ActualDamage['TotalDamage'] == 0) {
26
-				if($WeaponDamage['Shield'] > 0) {
27
-					if($ActualDamage['HasCDs']) {
25
+			} else if ($ActualDamage['TotalDamage'] == 0) {
26
+				if ($WeaponDamage['Shield'] > 0) {
27
+					if ($ActualDamage['HasCDs']) {
28 28
 						?> which proves ineffective against their combat drones<?php
29 29
 					} else {
30 30
 						?> which washes harmlessly over their hull<?php
31 31
 					}
32
-				} else if($WeaponDamage['Armour'] > 0) {
32
+				} else if ($WeaponDamage['Armour'] > 0) {
33 33
 					?> which is deflected by their shields<?php
34 34
 				} else {
35 35
 					?> but it cannot do any damage<?php
@@ -37,81 +37,81 @@  discard block
 block discarded – undo
37 37
 			} else {
38 38
 				?> destroying <?php
39 39
 				$DamageTypes = 0;
40
-				if($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
41
-				if($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
42
-				if($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
40
+				if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
41
+				if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
42
+				if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
43 43
 
44
-				if($ActualDamage['Shield'] > 0) {
44
+				if ($ActualDamage['Shield'] > 0) {
45 45
 					?><span class="shields"><?php echo number_format($ActualDamage['Shield']); ?></span> shields<?php
46 46
 					$this->doDamageTypeReductionDisplay($DamageTypes);
47 47
 				}
48
-				if($ActualDamage['NumCDs'] > 0) {
48
+				if ($ActualDamage['NumCDs'] > 0) {
49 49
 					?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']); ?></span> combat drones<?php
50 50
 					$this->doDamageTypeReductionDisplay($DamageTypes);
51 51
 				}
52
-				if($ActualDamage['Armour'] > 0) {
52
+				if ($ActualDamage['Armour'] > 0) {
53 53
 					?><span class="red"><?php echo number_format($ActualDamage['Armour']); ?></span> plates of armour<?php
54 54
 				}
55 55
 			}
56 56
 		} ?>.
57 57
 		<br /><?php
58 58
 		if ($ShotHit && $ActualDamage['KillingShot']) {
59
-			$this->includeTemplate('includes/TraderCombatKillMessage.inc',array('KillResults'=>$WeaponResults['KillResults'],'TargetPlayer'=>$TargetPlayer));
59
+			$this->includeTemplate('includes/TraderCombatKillMessage.inc', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPlayer'=>$TargetPlayer));
60 60
 		}
61 61
 	}
62 62
 }
63
-if(isset($PlanetCombatResults['Drones'])) {
64
-	$Drones =& $PlanetCombatResults['Drones'];
65
-	$ActualDamage =& $Drones['ActualDamage'];
66
-	$WeaponDamage =& $Drones['WeaponDamage'];
67
-	$TargetPlayer =& $Drones['TargetPlayer'];
63
+if (isset($PlanetCombatResults['Drones'])) {
64
+	$Drones = & $PlanetCombatResults['Drones'];
65
+	$ActualDamage = & $Drones['ActualDamage'];
66
+	$WeaponDamage = & $Drones['WeaponDamage'];
67
+	$TargetPlayer = & $Drones['TargetPlayer'];
68 68
 	$DamageTypes = 0;
69
-	if($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
70
-	if($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; }
71
-	if($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; }
69
+	if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; }
70
+	if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; }
71
+	if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; }
72 72
 	
73 73
 	echo $CombatPlanet->getCombatName();
74
-	if($WeaponDamage['Launched'] == 0) {
74
+	if ($WeaponDamage['Launched'] == 0) {
75 75
 		?> fails to launch it's combat drones<?php
76 76
 	} else {
77
-		?> 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();
78
-		if(!$ActualDamage['TargetAlreadyDead']) {
79
-			if($ActualDamage['TotalDamage'] == 0) {
80
-				if($WeaponDamage['Shield'] > 0) {
81
-					if($ActualDamage['HasCDs']) {
77
+		?> 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();
78
+		if (!$ActualDamage['TargetAlreadyDead']) {
79
+			if ($ActualDamage['TotalDamage'] == 0) {
80
+				if ($WeaponDamage['Shield'] > 0) {
81
+					if ($ActualDamage['HasCDs']) {
82 82
 						?> which prove ineffective against their combat drones<?php
83 83
 					} else {
84 84
 						?> which washes harmlessly over their hull<?php
85 85
 					}
86
-				} else if($WeaponDamage['Armour'] > 0) {
86
+				} else if ($WeaponDamage['Armour'] > 0) {
87 87
 					?> which is deflected by their shields<?php
88 88
 				} else {
89 89
 					?> but they cannot do any damage<?php
90 90
 				}
91 91
 			} else {
92 92
 				?> destroying <?php
93
-				if($ActualDamage['Shield'] > 0) {
93
+				if ($ActualDamage['Shield'] > 0) {
94 94
 					?><span class="shields"><?php echo number_format($ActualDamage['Shield']); ?></span> shields<?php
95 95
 					$this->doDamageTypeReductionDisplay($DamageTypes);
96 96
 				}
97
-				if($ActualDamage['NumCDs'] > 0) {
97
+				if ($ActualDamage['NumCDs'] > 0) {
98 98
 					?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']); ?></span> combat drones<?php
99 99
 					$this->doDamageTypeReductionDisplay($DamageTypes);
100 100
 				}
101
-				if($ActualDamage['Armour'] > 0) {
101
+				if ($ActualDamage['Armour'] > 0) {
102 102
 					?><span class="red"><?php echo number_format($ActualDamage['Armour']); ?></span> plates of armour<?php
103 103
 				}
104 104
 			}
105 105
 		}
106 106
 	} ?>.
107 107
 	<br /><?php
108
-	if($ActualDamage['KillingShot']) {
109
-		$this->includeTemplate('includes/TraderCombatKillMessage.inc',array('KillResults'=>$Drones['KillResults'],'TargetPlayer'=>$TargetPlayer));
108
+	if ($ActualDamage['KillingShot']) {
109
+		$this->includeTemplate('includes/TraderCombatKillMessage.inc', array('KillResults'=>$Drones['KillResults'], 'TargetPlayer'=>$TargetPlayer));
110 110
 	}
111 111
 }
112 112
 
113 113
 echo $CombatPlanet->getCombatName();
114
-if($TotalDamage > 0) {
114
+if ($TotalDamage > 0) {
115 115
 	?> hit for a total of <span class="red"><?php echo $TotalDamage; ?></span> damage in this round of combat<?php
116 116
 } else {
117 117
 	?> does no damage this round. You call that a planet? It needs a better builder<?php
Please login to merge, or discard this patch.
engine/Default/chat_sharing.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 	$shareFrom[$fromAccountId] = array(
20 20
 		'Player ID'   => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(),
21 21
 		'Player Name' => $otherPlayer == null ?
22
-		                 '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() :
23
-		                 $otherPlayer->getDisplayName(),
22
+						 '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() :
23
+						 $otherPlayer->getDisplayName(),
24 24
 		'All Games'   => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>',
25 25
 		'Game ID'     => $gameId,
26 26
 	);
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 	$shareTo[$toAccountId] = array(
41 41
 		'Player ID'   => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(),
42 42
 		'Player Name' => $otherPlayer == null ?
43
-		                 '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() :
44
-		                 $otherPlayer->getDisplayName(),
43
+						 '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() :
44
+						 $otherPlayer->getDisplayName(),
45 45
 		'All Games'   => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>',
46 46
 		'Game ID'     => $gameId,
47 47
 	);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
 	$shareFrom[$fromAccountId] = array(
20 20
 		'Player ID'   => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(),
21 21
 		'Player Name' => $otherPlayer == null ?
22
-		                 '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() :
23
-		                 $otherPlayer->getDisplayName(),
22
+		                 '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() : $otherPlayer->getDisplayName(),
24 23
 		'All Games'   => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>',
25 24
 		'Game ID'     => $gameId,
26 25
 	);
@@ -40,8 +39,7 @@  discard block
 block discarded – undo
40 39
 	$shareTo[$toAccountId] = array(
41 40
 		'Player ID'   => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(),
42 41
 		'Player Name' => $otherPlayer == null ?
43
-		                 '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() :
44
-		                 $otherPlayer->getDisplayName(),
42
+		                 '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() : $otherPlayer->getDisplayName(),
45 43
 		'All Games'   => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>',
46 44
 		'Game ID'     => $gameId,
47 45
 	);
Please login to merge, or discard this patch.
lib/Default/AbstractSmrPlayer.class.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 		while ($this->db->nextRecord()) {
315 315
 			try {
316 316
 				$otherPlayer = SmrPlayer::getPlayer($this->db->getInt('from_account_id'),
317
-				                                    $this->getGameID(), $forceUpdate);
317
+													$this->getGameID(), $forceUpdate);
318 318
 			} catch (PlayerNotFoundException $e) {
319 319
 				// Skip players that have not joined this game
320 320
 				continue;
@@ -878,9 +878,9 @@  discard block
 block discarded – undo
878 878
 	 */
879 879
 	public function canFight() {
880 880
 		return !($this->hasNewbieTurns() ||
881
-		         $this->isDead() ||
882
-		         $this->isLandedOnPlanet() ||
883
-		         $this->hasFederalProtection());
881
+				 $this->isDead() ||
882
+				 $this->isLandedOnPlanet() ||
883
+				 $this->hasFederalProtection());
884 884
 	}
885 885
 
886 886
 	public function setDead($bool) {
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 	/**
269 269
 	 * Insert a new player into the database. Returns the new player object.
270 270
 	 */
271
-	public static function createPlayer($accountID, $gameID, $playerName, $raceID, $isNewbie, $npc=false) {
271
+	public static function createPlayer($accountID, $gameID, $playerName, $raceID, $isNewbie, $npc = false) {
272 272
 		$db = MySqlDatabase::getInstance();
273 273
 		$db->lockTable('player');
274 274
 
@@ -1703,7 +1703,7 @@  discard block
 block discarded – undo
1703 1703
 			create_error('The saved sector must be in the box!');
1704 1704
 		}
1705 1705
 
1706
-		$storedDestinations =& $this->getStoredDestinations();
1706
+		$storedDestinations = & $this->getStoredDestinations();
1707 1707
 		foreach ($storedDestinations as &$sd) {
1708 1708
 			if ($sd['SectorID'] == $sectorID) {
1709 1709
 				$sd['OffsetTop'] = $offsetTop;
@@ -2030,13 +2030,13 @@  discard block
 block discarded – undo
2030 2030
 			$this->db->query('SELECT type,amount FROM player_hof WHERE ' . $this->SQL);
2031 2031
 			$this->HOF = array();
2032 2032
 			while ($this->db->nextRecord()) {
2033
-				$hof =& $this->HOF;
2033
+				$hof = & $this->HOF;
2034 2034
 				$typeList = explode(':', $this->db->getField('type'));
2035 2035
 				foreach ($typeList as $type) {
2036 2036
 					if (!isset($hof[$type])) {
2037 2037
 						$hof[$type] = array();
2038 2038
 					}
2039
-					$hof =& $hof[$type];
2039
+					$hof = & $hof[$type];
2040 2040
 				}
2041 2041
 				$hof = $this->db->getFloat('amount');
2042 2042
 			}
@@ -2115,8 +2115,8 @@  discard block
 block discarded – undo
2115 2115
 		}
2116 2116
 		self::$HOFVis[$hofType] = $visibility;
2117 2117
 
2118
-		$hof =& $this->HOF;
2119
-		$hofChanged =& $this->hasHOFChanged;
2118
+		$hof = & $this->HOF;
2119
+		$hofChanged = & $this->hasHOFChanged;
2120 2120
 		$new = false;
2121 2121
 		foreach ($typeList as $type) {
2122 2122
 			if (!isset($hofChanged[$type])) {
@@ -2126,8 +2126,8 @@  discard block
 block discarded – undo
2126 2126
 				$hof[$type] = array();
2127 2127
 				$new = true;
2128 2128
 			}
2129
-			$hof =& $hof[$type];
2130
-			$hofChanged =& $hofChanged[$type];
2129
+			$hof = & $hof[$type];
2130
+			$hofChanged = & $hofChanged[$type];
2131 2131
 		}
2132 2132
 		if ($hofChanged == null) {
2133 2133
 			$hofChanged = self::HOF_CHANGED;
@@ -2730,7 +2730,7 @@  discard block
 block discarded – undo
2730 2730
 	}
2731 2731
 
2732 2732
 	private function setupMissionStep($missionID) {
2733
-		$mission =& $this->missions[$missionID];
2733
+		$mission = & $this->missions[$missionID];
2734 2734
 		if ($mission['On Step'] >= count(MISSIONS[$missionID]['Steps'])) {
2735 2735
 			// Nothing to do if this mission is already completed
2736 2736
 			return;
@@ -2779,7 +2779,7 @@  discard block
 block discarded – undo
2779 2779
 			'Starting Sector' => $this->getSectorID()
2780 2780
 		);
2781 2781
 
2782
-		$this->missions[$missionID] =& $mission;
2782
+		$this->missions[$missionID] = & $mission;
2783 2783
 		$this->setupMissionStep($missionID);
2784 2784
 		$this->rebuildMission($missionID);
2785 2785
 
@@ -2829,7 +2829,7 @@  discard block
 block discarded – undo
2829 2829
 
2830 2830
 	public function claimMissionReward($missionID) {
2831 2831
 		$this->getMissions();
2832
-		$mission =& $this->missions[$missionID];
2832
+		$mission = & $this->missions[$missionID];
2833 2833
 		if ($mission === false) {
2834 2834
 			throw new Exception('Unknown mission: ' . $missionID);
2835 2835
 		}
Please login to merge, or discard this patch.
templates/Default/engine/Default/beta_functions.php 1 patch
Braces   +14 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,8 +76,13 @@  discard block
 block discarded – undo
76 76
 	<input type="number" name="amount" value="0" min="<?php echo MIN_GLOBAL_RELATIONS; ?>" max="<?php echo MAX_GLOBAL_RELATIONS; ?>" style="width:75px" />&nbsp;
77 77
 	<select name="race"><?php
78 78
 		foreach (Globals::getRaces() as $race) {
79
-			if ($race['Race ID'] == $ThisPlayer->getRaceID()) continue;
80
-			if ($race['Race ID'] == RACE_NEUTRAL) continue; ?>
79
+			if ($race['Race ID'] == $ThisPlayer->getRaceID()) {
80
+				continue;
81
+			}
82
+			if ($race['Race ID'] == RACE_NEUTRAL) {
83
+				continue;
84
+			}
85
+			?>
81 86
 			<option value="<?php echo $race['Race ID']; ?>"><?php echo $race['Race Name']; ?></option><?php
82 87
 		} ?>
83 88
 	</select>&nbsp;&nbsp;
@@ -88,8 +93,13 @@  discard block
 block discarded – undo
88 93
 <form method="POST" action="<?php echo $ChangeRaceHREF; ?>">
89 94
 	<select name="race"><?php
90 95
 		foreach (Globals::getRaces() as $race) {
91
-			if ($race['Race ID'] == $ThisPlayer->getRaceID()) continue;
92
-			if ($race['Race ID'] == RACE_NEUTRAL) continue; ?>
96
+			if ($race['Race ID'] == $ThisPlayer->getRaceID()) {
97
+				continue;
98
+			}
99
+			if ($race['Race ID'] == RACE_NEUTRAL) {
100
+				continue;
101
+			}
102
+			?>
93 103
 			<option value="<?php echo $race['Race ID']; ?>"><?php echo $race['Race Name']; ?></option><?php
94 104
 		} ?>
95 105
 	</select>&nbsp;&nbsp;
Please login to merge, or discard this patch.