Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Push — master ( 2516c9...7ae264 )
by Dan
04:09
created
engine/Default/cargo_dump_processing.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
 	// Don't lose more exp than you have
48 48
 	$lost_xp = min($player->getExperience(),
49
-	               IRound(SmrPort::getBaseExperience($amount, $good_distance)));
49
+				   IRound(SmrPort::getBaseExperience($amount, $good_distance)));
50 50
 	$player->decreaseExperience($lost_xp);
51 51
 	$player->increaseHOF($lost_xp, array('Trade', 'Experience', 'Jettisoned'), HOF_PUBLIC);
52 52
 
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.
admin/Default/1.6/check_map.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 	}
21 21
 }
22 22
 $missingLocs = array_diff(array_keys(SmrLocation::getAllLocations()),
23
-                          array_keys($existingLocs));
23
+						  array_keys($existingLocs));
24 24
 $missingLocNames = [];
25 25
 foreach ($missingLocs as $locID) {
26 26
 	$missingLocNames[] = SmrLocation::getLocation($locID)->getName();
Please login to merge, or discard this patch.
lib/Default/AbstractSmrAccount.class.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -363,26 +363,26 @@
 block discarded – undo
363 363
 	}
364 364
 
365 365
 	public function isNPC() {
366
-		if(!isset($this->npc)) {
367
-			$this->db->query('SELECT login FROM npc_logins WHERE login = '.$this->db->escapeString($this->getLogin()).' LIMIT 1;');
366
+		if (!isset($this->npc)) {
367
+			$this->db->query('SELECT login FROM npc_logins WHERE login = ' . $this->db->escapeString($this->getLogin()) . ' LIMIT 1;');
368 368
 			$this->npc = $this->db->nextRecord();
369 369
 		}
370 370
 		return $this->npc;
371 371
 	}
372 372
 
373 373
 	protected function getHOFData() {
374
-		if(!isset($this->HOF)) {
374
+		if (!isset($this->HOF)) {
375 375
 			//Get Player HOF
376 376
 			$this->db->query('SELECT type,sum(amount) as amount FROM player_hof WHERE ' . $this->SQL . ' AND game_id IN (SELECT game_id FROM game WHERE ignore_stats = \'FALSE\') GROUP BY type');
377 377
 			$this->HOF = array();
378
-			while($this->db->nextRecord()) {
379
-				$hof =& $this->HOF;
380
-				$typeList = explode(':',$this->db->getField('type'));
381
-				foreach($typeList as $type) {
382
-					if(!isset($hof[$type])) {
378
+			while ($this->db->nextRecord()) {
379
+				$hof = & $this->HOF;
380
+				$typeList = explode(':', $this->db->getField('type'));
381
+				foreach ($typeList as $type) {
382
+					if (!isset($hof[$type])) {
383 383
 						$hof[$type] = array();
384 384
 					}
385
-					$hof =& $hof[$type];
385
+					$hof = & $hof[$type];
386 386
 				}
387 387
 				$hof = $this->db->getFloat('amount');
388 388
 			}
Please login to merge, or discard this patch.
lib/Default/SmrCombatDrones.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 			// If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods.
133 133
 			return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
134 134
 		}
135
-		$damage =& $this->getModifiedDamage();
135
+		$damage = & $this->getModifiedDamage();
136 136
 		$damage['Launched'] = ICeil($this->getNumberOfCDs() * $this->getModifiedAccuracyAgainstForces($weaponPlayer, $forces) / 100);
137 137
 		$damage['Kamikaze'] = 0;
138 138
 		if ($weaponPlayer->isCombatDronesKamikazeOnMines()) { // If kamikaze then damage is same as MINE_ARMOUR
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 			// If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods.
157 157
 			return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
158 158
 		}
159
-		$damage =& $this->getModifiedDamage();
159
+		$damage = & $this->getModifiedDamage();
160 160
 		$damage['Launched'] = ICeil($this->getNumberOfCDs() * $this->getModifiedAccuracyAgainstPort($weaponPlayer, $port) / 100);
161 161
 		$damage['MaxDamage'] = ICeil($damage['Launched'] * $damage['MaxDamage']);
162 162
 		$damage['Shield'] = ICeil($damage['Launched'] * $damage['Shield']);
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 			// If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods.
171 171
 			return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
172 172
 		}
173
-		$damage =& $this->getModifiedDamage();
173
+		$damage = & $this->getModifiedDamage();
174 174
 		$damage['Launched'] = ICeil($this->getNumberOfCDs() * $this->getModifiedAccuracyAgainstPlanet($weaponPlayer, $planet) / 100);
175 175
 		$planetMod = self::PLANET_DAMAGE_MOD;
176 176
 		$damage['MaxDamage'] = ICeil($damage['Launched'] * $damage['MaxDamage'] * $planetMod);
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 			$return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
186 186
 			return $return;
187 187
 		}
188
-		$damage =& $this->getModifiedDamage();
188
+		$damage = & $this->getModifiedDamage();
189 189
 		if ($targetPlayer->getShip()->hasDCS()) {
190 190
 			$damage['MaxDamage'] *= DCS_PLAYER_DAMAGE_DECIMAL_PERCENT;
191 191
 			$damage['Shield'] *= DCS_PLAYER_DAMAGE_DECIMAL_PERCENT;
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 			$return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
204 204
 			return $return;
205 205
 		}
206
-		$damage =& $this->getModifiedDamage();
206
+		$damage = & $this->getModifiedDamage();
207 207
 		
208 208
 		if ($targetPlayer->getShip()->hasDCS()) {
209 209
 			$damage['MaxDamage'] *= DCS_FORCE_DAMAGE_DECIMAL_PERCENT;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 			$return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
224 224
 			return $return;
225 225
 		}
226
-		$damage =& $this->getModifiedDamage();
226
+		$damage = & $this->getModifiedDamage();
227 227
 		
228 228
 		if ($targetPlayer->getShip()->hasDCS()) {
229 229
 			$damage['MaxDamage'] *= DCS_PORT_DAMAGE_DECIMAL_PERCENT;
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 			$return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
243 243
 			return $return;
244 244
 		}
245
-		$damage =& $this->getModifiedDamage();
245
+		$damage = & $this->getModifiedDamage();
246 246
 		
247 247
 		if ($targetPlayer->getShip()->hasDCS()) {
248 248
 			$damage['MaxDamage'] *= DCS_PLANET_DAMAGE_DECIMAL_PERCENT;
Please login to merge, or discard this patch.
lib/Default/smr.inc 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -469,8 +469,9 @@
 block discarded – undo
469 469
 
470 470
 		if (!$player->isDead() && $player->getNewbieTurns() <= NEWBIE_TURNS_WARNING_LIMIT &&
471 471
 			$player->getNewbieWarning() &&
472
-			$var['url'] != 'newbie_warning_processing.php')
473
-			forward(create_container('newbie_warning_processing.php'));
472
+			$var['url'] != 'newbie_warning_processing.php') {
473
+					forward(create_container('newbie_warning_processing.php'));
474
+		}
474 475
 	}
475 476
 
476 477
 	// Initialize the template
Please login to merge, or discard this patch.
tools/npc/npc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 		}
120 120
 
121 121
 		try {
122
-			$TRADE_ROUTE =& $GLOBALS['TRADE_ROUTE'];
122
+			$TRADE_ROUTE = & $GLOBALS['TRADE_ROUTE'];
123 123
 			debug('Action #' . $actions);
124 124
 
125 125
 			//We have to reload player on each loop
@@ -138,14 +138,14 @@  discard block
 block discarded – undo
138 138
 			}
139 139
 
140 140
 			if (!isset($TRADE_ROUTE)) { //We only want to change trade route if there isn't already one set.
141
-				$TRADE_ROUTES =& findRoutes($player);
142
-				$TRADE_ROUTE =& changeRoute($TRADE_ROUTES);
141
+				$TRADE_ROUTES = & findRoutes($player);
142
+				$TRADE_ROUTE = & changeRoute($TRADE_ROUTES);
143 143
 			}
144 144
 
145 145
 			if ($player->isDead()) {
146 146
 				debug('Some evil person killed us, let\'s move on now.');
147 147
 				$previousContainer = null; //We died, we don't care what we were doing beforehand.
148
-				$TRADE_ROUTE =& changeRoute($TRADE_ROUTES); //Change route
148
+				$TRADE_ROUTE = & changeRoute($TRADE_ROUTES); //Change route
149 149
 				processContainer(create_container('death_processing.php'));
150 150
 			}
151 151
 			if ($player->getNewbieTurns() <= NEWBIE_TURNS_WARNING_LIMIT && $player->getNewbieWarning()) {
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 								processContainer(tradeGoods($goodID, $player, $port));
228 228
 							} else {
229 229
 								//Move to next route or fed.
230
-								if (($TRADE_ROUTE =& changeRoute($TRADE_ROUTES)) === false) {
230
+								if (($TRADE_ROUTE = & changeRoute($TRADE_ROUTES)) === false) {
231 231
 									debug('Changing Route Failed');
232 232
 									processContainer(plotToFed($player));
233 233
 								} else {
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 							processContainer(tradeGoods($goodID, $player, $port));
255 255
 						} else {
256 256
 							//Move to next route or fed.
257
-							if (($TRADE_ROUTE =& changeRoute($TRADE_ROUTES)) === false) {
257
+							if (($TRADE_ROUTE = & changeRoute($TRADE_ROUTES)) === false) {
258 258
 								debug('Changing Route Failed');
259 259
 								processContainer(plotToFed($player));
260 260
 							} else {
@@ -586,9 +586,9 @@  discard block
 block discarded – undo
586 586
 		return $false;
587 587
 	}
588 588
 	$routeKey = array_rand($tradeRoutes);
589
-	$tradeRoute =& $tradeRoutes[$routeKey];
589
+	$tradeRoute = & $tradeRoutes[$routeKey];
590 590
 	unset($tradeRoutes[$routeKey]);
591
-	$GLOBALS['TRADE_ROUTE'] =& $tradeRoute;
591
+	$GLOBALS['TRADE_ROUTE'] = & $tradeRoute;
592 592
 	debug('Switched route', $tradeRoute);
593 593
 	return $tradeRoute;
594 594
 }
Please login to merge, or discard this patch.
lib/Default/SmrWeapon.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 			// If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods.
198 198
 			return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
199 199
 		}
200
-		$damage =& $this->getModifiedDamage();
200
+		$damage = & $this->getModifiedDamage();
201 201
 		return $damage;
202 202
 	}
203 203
 	
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 			// If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods.
207 207
 			return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
208 208
 		}
209
-		$damage =& $this->getModifiedDamage();
209
+		$damage = & $this->getModifiedDamage();
210 210
 		return $damage;
211 211
 	}
212 212
 	
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 			// If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods.
216 216
 			return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
217 217
 		}
218
-		$damage =& $this->getModifiedDamage();
218
+		$damage = & $this->getModifiedDamage();
219 219
 		
220 220
 		$planetMod = self::PLANET_DAMAGE_MOD;
221 221
 		$damage['MaxDamage'] = ICeil($damage['MaxDamage'] * $planetMod);
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 			$return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover());
236 236
 			return $return;
237 237
 		}
238
-		$damage =& $this->getModifiedDamage();
238
+		$damage = & $this->getModifiedDamage();
239 239
 		return $damage;
240 240
 	}
241 241
 	
Please login to merge, or discard this patch.