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 (#915)
by
unknown
04:32
created
engine/Default/planet_attack_processing.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,12 +49,12 @@
 block discarded – undo
49 49
 }
50 50
 
51 51
 foreach ($attackers as $attacker) {
52
-	$playerResults =& $attacker->shootPlanet($planet, false);
53
-	$results['Attackers']['Traders'][$attacker->getAccountID()] =& $playerResults;
52
+	$playerResults = & $attacker->shootPlanet($planet, false);
53
+	$results['Attackers']['Traders'][$attacker->getAccountID()] = & $playerResults;
54 54
 	$results['Attackers']['TotalDamage'] += $playerResults['TotalDamage'];
55 55
 }
56 56
 $results['Attackers']['Downgrades'] = $planet->checkForDowngrade($results['Attackers']['TotalDamage']);
57
-$results['Planet'] =& $planet->shootPlayers($attackers);
57
+$results['Planet'] = & $planet->shootPlayers($attackers);
58 58
 
59 59
 $account->log(LOG_TYPE_PLANET_BUSTING, 'Player attacks planet, the planet does ' . $results['Planet']['TotalDamage'] . ', their team does ' . $results['Attackers']['TotalDamage'] . ' and downgrades: ' . var_export($results['Attackers']['Downgrades'], true), $planet->getSectorID());
60 60
 
Please login to merge, or discard this patch.
engine/Default/port_attack_processing.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,12 +45,12 @@
 block discarded – undo
45 45
 }
46 46
 
47 47
 foreach ($attackers as $attacker) {
48
-	$playerResults =& $attacker->shootPort($port);
49
-	$results['Attackers']['Traders'][$attacker->getAccountID()] =& $playerResults;
48
+	$playerResults = & $attacker->shootPort($port);
49
+	$results['Attackers']['Traders'][$attacker->getAccountID()] = & $playerResults;
50 50
 	$results['Attackers']['TotalDamage'] += $playerResults['TotalDamage'];
51 51
 }
52 52
 $results['Attackers']['Downgrades'] = $port->checkForDowngrade($results['Attackers']['TotalDamage']);
53
-$results['Port'] =& $port->shootPlayers($attackers);
53
+$results['Port'] = & $port->shootPlayers($attackers);
54 54
 
55 55
 $account->log(LOG_TYPE_PORT_RAIDING, 'Player attacks port, the port does ' . $results['Port']['TotalDamage'] . ', their team does ' . $results['Attackers']['TotalDamage'] . ' and downgrades ' . $results['Attackers']['Downgrades'] . ' levels.', $port->getSectorID());
56 56
 
Please login to merge, or discard this patch.
engine/Default/trader_attack_processing.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
 
42 42
 function teamAttack(&$results, $fightingPlayers, $attack, $defend) {
43 43
 	foreach ($fightingPlayers[$attack] as $accountID => $teamPlayer) {
44
-		$playerResults =& $teamPlayer->shootPlayers($fightingPlayers[$defend]);
45
-		$results[$attack]['Traders'][$teamPlayer->getAccountID()] =& $playerResults;
44
+		$playerResults = & $teamPlayer->shootPlayers($fightingPlayers[$defend]);
45
+		$results[$attack]['Traders'][$teamPlayer->getAccountID()] = & $playerResults;
46 46
 		$results[$attack]['TotalDamage'] += $playerResults['TotalDamage'];
47 47
 
48 48
 		// Award assists (if there are multiple attackers)
Please login to merge, or discard this patch.
engine/Default/forces_attack_processing.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,18 +72,18 @@
 block discarded – undo
72 72
 
73 73
 // If mines are bumped, the forces shoot first. Otherwise player shoots first.
74 74
 if ($bump) {
75
-	$results['Forces'] =& $forces->shootPlayers($attackers, $bump);
75
+	$results['Forces'] = & $forces->shootPlayers($attackers, $bump);
76 76
 }
77 77
 
78 78
 $results['Attackers'] = array('TotalDamage' => 0);
79 79
 foreach ($attackers as $attacker) {
80
-	$playerResults =& $attacker->shootForces($forces);
81
-	$results['Attackers']['Traders'][$attacker->getAccountID()] =& $playerResults;
80
+	$playerResults = & $attacker->shootForces($forces);
81
+	$results['Attackers']['Traders'][$attacker->getAccountID()] = & $playerResults;
82 82
 	$results['Attackers']['TotalDamage'] += $playerResults['TotalDamage'];
83 83
 }
84 84
 
85 85
 if (!$bump) {
86
-	$results['Forces'] =& $forces->shootPlayers($attackers, $bump);
86
+	$results['Forces'] = & $forces->shootPlayers($attackers, $bump);
87 87
 	$forces->updateExpire();
88 88
 }
89 89
 
Please login to merge, or discard this patch.
engine/Default/hall_of_fame_new.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@
 block discarded – undo
20 20
 const USER_SCORE_NAME = 'User Score';
21 21
 $hofTypes = array(DONATION_NAME=>true, USER_SCORE_NAME=>true);
22 22
 while ($db->nextRecord()) {
23
-	$hof =& $hofTypes;
23
+	$hof = & $hofTypes;
24 24
 	$typeList = explode(':', $db->getField('type'));
25 25
 	foreach ($typeList as $type) {
26 26
 		if (!isset($hof[$type])) {
27 27
 			$hof[$type] = array();
28 28
 		}
29
-		$hof =& $hof[$type];
29
+		$hof = & $hof[$type];
30 30
 	}
31 31
 	$hof = true;
32 32
 }
Please login to merge, or discard this patch.
engine/Default/hall_of_fame_player_detail.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@
 block discarded – undo
20 20
 const USER_SCORE_NAME = 'User Score';
21 21
 $hofTypes = array(DONATION_NAME=>true, USER_SCORE_NAME=>true);
22 22
 while ($db->nextRecord()) {
23
-	$hof =& $hofTypes;
23
+	$hof = & $hofTypes;
24 24
 	$typeList = explode(':', $db->getField('type'));
25 25
 	foreach ($typeList as $type) {
26 26
 		if (!isset($hof[$type])) {
27 27
 			$hof[$type] = array();
28 28
 		}
29
-		$hof =& $hof[$type];
29
+		$hof = & $hof[$type];
30 30
 	}
31 31
 	$hof = true;
32 32
 }
Please login to merge, or discard this patch.
lib/Default/SmrForce.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -446,20 +446,20 @@
 block discarded – undo
446 446
 
447 447
 		if ($this->hasMines()) {
448 448
 			$thisMines = new SmrMines($this->getGameID(), $this->getMines());
449
-			$results['Results']['Mines'] =& $thisMines->shootPlayerAsForce($this, $targetPlayers[array_rand($targetPlayers)], $minesAreAttacker);
449
+			$results['Results']['Mines'] = & $thisMines->shootPlayerAsForce($this, $targetPlayers[array_rand($targetPlayers)], $minesAreAttacker);
450 450
 			$results['TotalDamage'] += $results['Results']['Mines']['ActualDamage']['TotalDamage'];
451 451
 		}
452 452
 
453 453
 		if ($this->hasCDs()) {
454 454
 			$thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs());
455
-			$results['Results']['Drones'] =& $thisCDs->shootPlayerAsForce($this, $targetPlayers[array_rand($targetPlayers)]);
455
+			$results['Results']['Drones'] = & $thisCDs->shootPlayerAsForce($this, $targetPlayers[array_rand($targetPlayers)]);
456 456
 			$results['TotalDamage'] += $results['Results']['Drones']['ActualDamage']['TotalDamage'];
457 457
 		}
458 458
 
459 459
 		if (!$minesAreAttacker) {
460 460
 			if ($this->hasSDs()) {
461 461
 				$thisSDs = new SmrScoutDrones($this->getGameID(), $this->getSDs());
462
-				$results['Results']['Scouts'] =& $thisSDs->shootPlayerAsForce($this, $targetPlayers[array_rand($targetPlayers)]);
462
+				$results['Results']['Scouts'] = & $thisSDs->shootPlayerAsForce($this, $targetPlayers[array_rand($targetPlayers)]);
463 463
 				$results['TotalDamage'] += $results['Results']['Scouts']['ActualDamage']['TotalDamage'];
464 464
 			}
465 465
 		}
Please login to merge, or discard this patch.
lib/Default/SmrPlanetType.class.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	/**
41 41
 	 * Access properties of structures that this planet type can build.
42 42
 	 */
43
-	public function structureTypes($structureID=false) {
43
+	public function structureTypes($structureID = false) {
44 44
 		if (!isset($this->structures)) {
45 45
 			foreach (static::STRUCTURES as $ID => $Info) {
46 46
 				$this->structures[$ID] = new SmrPlanetStructureType($ID, $Info);
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
 			'exp_gain' => 540,
78 78
 		],
79 79
 	];
80
-	public function name()         { return "Terran Planet"; }
81
-	public function imageLink()    { return "images/planet1.png"; }
82
-	public function description()  { return "A lush world, with forests, seas, sweeping meadows, and indigenous lifeforms."; }
80
+	public function name() { return "Terran Planet"; }
81
+	public function imageLink() { return "images/planet1.png"; }
82
+	public function description() { return "A lush world, with forests, seas, sweeping meadows, and indigenous lifeforms."; }
83 83
 	public function maxAttackers() { return 10; }
84
-	public function maxLanded()    { return self::MAX_LANDED_UNLIMITED; }
85
-	public function menuOptions()  { return self::DEFAULT_MENU_OPTIONS; }
84
+	public function maxLanded() { return self::MAX_LANDED_UNLIMITED; }
85
+	public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; }
86 86
 }
87 87
 
88 88
 class AridPlanet extends SmrPlanetType {
@@ -106,12 +106,12 @@  discard block
 block discarded – undo
106 106
 			'exp_gain' => 180,
107 107
 		],
108 108
 	];
109
-	public function name()         { return "Arid Planet"; }
110
-	public function imageLink()    { return "images/planet2.png"; }
111
-	public function description()  { return "A world mostly devoid of surface water, but capable of supporting life."; }
109
+	public function name() { return "Arid Planet"; }
110
+	public function imageLink() { return "images/planet2.png"; }
111
+	public function description() { return "A world mostly devoid of surface water, but capable of supporting life."; }
112 112
 	public function maxAttackers() { return 5; }
113
-	public function maxLanded()    { return 5; }
114
-	public function menuOptions()  { return ['CONSTRUCTION', 'DEFENSE', 'STOCKPILE', 'OWNERSHIP']; }
113
+	public function maxLanded() { return 5; }
114
+	public function menuOptions() { return ['CONSTRUCTION', 'DEFENSE', 'STOCKPILE', 'OWNERSHIP']; }
115 115
 }
116 116
 
117 117
 class DwarfPlanet extends SmrPlanetType {
@@ -135,12 +135,12 @@  discard block
 block discarded – undo
135 135
 			'exp_gain' => 540,
136 136
 		],
137 137
 	];
138
-	public function name()         { return "Dwarf Planet"; }
139
-	public function imageLink()    { return "images/planet3.png"; }
140
-	public function description()  { return "A smaller than usual planet, with no native life present."; }
138
+	public function name() { return "Dwarf Planet"; }
139
+	public function imageLink() { return "images/planet3.png"; }
140
+	public function description() { return "A smaller than usual planet, with no native life present."; }
141 141
 	public function maxAttackers() { return 5; }
142
-	public function maxLanded()    { return self::MAX_LANDED_UNLIMITED; }
143
-	public function menuOptions()  { return self::DEFAULT_MENU_OPTIONS; }
142
+	public function maxLanded() { return self::MAX_LANDED_UNLIMITED; }
143
+	public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; }
144 144
 }
145 145
 
146 146
 class ProtoPlanet extends SmrPlanetType {
@@ -170,12 +170,12 @@  discard block
 block discarded – undo
170 170
 			'exp_gain' => 540,
171 171
 		],
172 172
 	];
173
-	public function name()         { return "Protoplanet"; }
174
-	public function imageLink()    { return "images/planet5.png"; }
175
-	public function description()  { return "A developing planet, not yet able to support the infrastructure of advanced technologies."; }
173
+	public function name() { return "Protoplanet"; }
174
+	public function imageLink() { return "images/planet5.png"; }
175
+	public function description() { return "A developing planet, not yet able to support the infrastructure of advanced technologies."; }
176 176
 	public function maxAttackers() { return 5; }
177
-	public function maxLanded()    { return 5; }
178
-	public function menuOptions()  { return self::DEFAULT_MENU_OPTIONS; }
177
+	public function maxLanded() { return 5; }
178
+	public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; }
179 179
 }
180 180
 
181 181
 class DefenseWorld extends SmrPlanetType {
@@ -205,10 +205,10 @@  discard block
 block discarded – undo
205 205
 			'exp_gain' => 9,
206 206
 		],
207 207
 	];
208
-	public function name()         { return "Defense World"; }
209
-	public function imageLink()    { return "images/planet4.png"; }
210
-	public function description()  { return "A fully armed and operational battle station loaded with excessive firepower."; }
208
+	public function name() { return "Defense World"; }
209
+	public function imageLink() { return "images/planet4.png"; }
210
+	public function description() { return "A fully armed and operational battle station loaded with excessive firepower."; }
211 211
 	public function maxAttackers() { return 10; }
212
-	public function maxLanded()    { return self::MAX_LANDED_UNLIMITED; }
213
-	public function menuOptions()  { return self::DEFAULT_MENU_OPTIONS; }
212
+	public function maxLanded() { return self::MAX_LANDED_UNLIMITED; }
213
+	public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; }
214 214
 }
Please login to merge, or discard this patch.
lib/Default/AbstractSmrPort.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1180,7 +1180,7 @@  discard block
 block discarded – undo
1180 1180
 			do {
1181 1181
 				$targetPlayer = $targetPlayers[array_rand($targetPlayers)];
1182 1182
 			} while ($results['TotalShotsPerTargetPlayer'][$targetPlayer->getAccountID()] > min($results['TotalShotsPerTargetPlayer']));
1183
-			$results['Weapons'][$orderID] =& $weapon->shootPlayerAsPort($this, $targetPlayer);
1183
+			$results['Weapons'][$orderID] = & $weapon->shootPlayerAsPort($this, $targetPlayer);
1184 1184
 			$results['TotalShotsPerTargetPlayer'][$targetPlayer->getAccountID()]++;
1185 1185
 			if ($results['Weapons'][$orderID]['Hit']) {
1186 1186
 				$results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage'];
@@ -1189,7 +1189,7 @@  discard block
 block discarded – undo
1189 1189
 		}
1190 1190
 		if ($this->hasCDs()) {
1191 1191
 			$thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs(), true);
1192
-			$results['Drones'] =& $thisCDs->shootPlayerAsPort($this, $targetPlayers[array_rand($targetPlayers)]);
1192
+			$results['Drones'] = & $thisCDs->shootPlayerAsPort($this, $targetPlayers[array_rand($targetPlayers)]);
1193 1193
 			$results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage'];
1194 1194
 			$results['TotalDamagePerTargetPlayer'][$results['Drones']['TargetPlayer']->getAccountID()] += $results['Drones']['ActualDamage']['TotalDamage'];
1195 1195
 		}
Please login to merge, or discard this patch.