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 ( a0da36...64adfe )
by Dan
04:27
created
src/tools/npc/npc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 		}
117 117
 
118 118
 		try {
119
-			$TRADE_ROUTE =& $GLOBALS['TRADE_ROUTE'];
119
+			$TRADE_ROUTE = & $GLOBALS['TRADE_ROUTE'];
120 120
 			debug('Action #' . $actions);
121 121
 
122 122
 			//We have to reload player on each loop
@@ -140,14 +140,14 @@  discard block
 block discarded – undo
140 140
 			}
141 141
 
142 142
 			if (!isset($TRADE_ROUTE)) { //We only want to change trade route if there isn't already one set.
143
-				$TRADE_ROUTES =& findRoutes($player);
144
-				$TRADE_ROUTE =& changeRoute($TRADE_ROUTES);
143
+				$TRADE_ROUTES = & findRoutes($player);
144
+				$TRADE_ROUTE = & changeRoute($TRADE_ROUTES);
145 145
 			}
146 146
 
147 147
 			if ($player->isDead()) {
148 148
 				debug('Some evil person killed us, let\'s move on now.');
149 149
 				$previousContainer = null; //We died, we don't care what we were doing beforehand.
150
-				$TRADE_ROUTE =& changeRoute($TRADE_ROUTES); //Change route
150
+				$TRADE_ROUTE = & changeRoute($TRADE_ROUTES); //Change route
151 151
 				processContainer(Page::create('death_processing.php'));
152 152
 			}
153 153
 			if ($player->getNewbieTurns() <= NEWBIE_TURNS_WARNING_LIMIT && $player->getNewbieWarning()) {
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 								processContainer(tradeGoods($goodID, $player, $port));
224 224
 							} else {
225 225
 								//Move to next route or fed.
226
-								if (($TRADE_ROUTE =& changeRoute($TRADE_ROUTES)) === false) {
226
+								if (($TRADE_ROUTE = & changeRoute($TRADE_ROUTES)) === false) {
227 227
 									debug('Changing Route Failed');
228 228
 									processContainer(plotToFed($player));
229 229
 								} else {
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 							processContainer(tradeGoods($goodID, $player, $port));
251 251
 						} else {
252 252
 							//Move to next route or fed.
253
-							if (($TRADE_ROUTE =& changeRoute($TRADE_ROUTES)) === false) {
253
+							if (($TRADE_ROUTE = & changeRoute($TRADE_ROUTES)) === false) {
254 254
 								debug('Changing Route Failed');
255 255
 								processContainer(plotToFed($player));
256 256
 							} else {
@@ -582,9 +582,9 @@  discard block
 block discarded – undo
582 582
 		return $false;
583 583
 	}
584 584
 	$routeKey = array_rand($tradeRoutes);
585
-	$tradeRoute =& $tradeRoutes[$routeKey];
585
+	$tradeRoute = & $tradeRoutes[$routeKey];
586 586
 	unset($tradeRoutes[$routeKey]);
587
-	$GLOBALS['TRADE_ROUTE'] =& $tradeRoute;
587
+	$GLOBALS['TRADE_ROUTE'] = & $tradeRoute;
588 588
 	debug('Switched route', $tradeRoute);
589 589
 	return $tradeRoute;
590 590
 }
Please login to merge, or discard this patch.
src/lib/Default/smr.inc.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -375,8 +375,9 @@
 block discarded – undo
375 375
 
376 376
 		if (!$player->isDead() && $player->getNewbieTurns() <= NEWBIE_TURNS_WARNING_LIMIT &&
377 377
 			$player->getNewbieWarning() &&
378
-			$var['url'] != 'newbie_warning_processing.php')
379
-			Page::create('newbie_warning_processing.php')->go();
378
+			$var['url'] != 'newbie_warning_processing.php') {
379
+					Page::create('newbie_warning_processing.php')->go();
380
+		}
380 381
 	}
381 382
 
382 383
 	// Initialize the template
Please login to merge, or discard this patch.
src/admin/Default/1.6/universe_create_planets.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
 // Form to make planet changes
35 35
 $container = Page::create('1.6/universe_create_save_processing.php',
36
-                              '1.6/universe_create_sectors.php', $var);
36
+							  '1.6/universe_create_sectors.php', $var);
37 37
 $template->assign('CreatePlanetsFormHREF', $container->href());
38 38
 
39 39
 // HREF to cancel and return to the previous page
Please login to merge, or discard this patch.
src/admin/Default/1.6/universe_create_locations.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
 
95 95
 // Form to make location changes
96 96
 $container = Page::create('1.6/universe_create_save_processing.php',
97
-                              '1.6/universe_create_sectors.php', $var);
97
+							  '1.6/universe_create_sectors.php', $var);
98 98
 $template->assign('CreateLocationsFormHREF', $container->href());
99 99
 
100 100
 // HREF to cancel and return to the previous page
Please login to merge, or discard this patch.
src/admin/Default/enable_game_processing.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,4 +7,4 @@
 block discarded – undo
7 7
 $msg = '<span class="green">SUCCESS: </span>Enabled game ' . $game->getDisplayName();
8 8
 
9 9
 Page::create('skeleton.php', 'enable_game.php',
10
-             array('processing_msg' => $msg))->go();
10
+			 array('processing_msg' => $msg))->go();
Please login to merge, or discard this patch.
src/lib/Default/SmrSession.class.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	public static int $last_accessed;
35 35
 	private static Time $pageRequestTime;
36 36
 
37
-	protected static ?array $previousAjaxReturns;
37
+	protected static ? array $previousAjaxReturns;
38 38
 	protected static array $ajaxReturns = array();
39 39
 
40 40
 	/**
@@ -136,8 +136,7 @@  discard block
 block discarded – undo
136 136
 				} elseif ($value['RemainingPageLoads'] < 0) {
137 137
 					//This link is no longer valid
138 138
 					unset(self::$var[$key]);
139
-				} else {
140
-					--self::$var[$key]['RemainingPageLoads'];
139
+				} else {--self::$var[$key]['RemainingPageLoads'];
141 140
 					if (isset($value['CommonID'])) {
142 141
 						self::$commonIDs[$value['CommonID']] = $key;
143 142
 					}
Please login to merge, or discard this patch.
src/lib/Default/DummyPlayer.class.php 2 patches
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,30 +1,30 @@  discard block
 block discarded – undo
1 1
 <?php declare(strict_types=1);
2 2
 
3 3
 class DummyPlayer extends AbstractSmrPlayer {
4
-	public function __construct($gameID=0,$playerName='Dummy',$raceID=1,$experience=1000,$alignment=100,$allianceID=0,$shipTypeID=60) {
4
+	public function __construct($gameID = 0, $playerName = 'Dummy', $raceID = 1, $experience = 1000, $alignment = 100, $allianceID = 0, $shipTypeID = 60) {
5 5
 		$this->accountID				= 0;
6
-		$this->gameID					= (int) $gameID;
7
-		$this->playerName				= (string) $playerName;
6
+		$this->gameID = (int)$gameID;
7
+		$this->playerName = (string)$playerName;
8 8
 		$this->playerID					= 0;
9 9
 		$this->sectorID					= 0;
10
-		$this->lastSectorID				= 0;
10
+		$this->lastSectorID = 0;
11 11
 		$this->turns					= 1000;
12
-		$this->newbieTurns				= 0;
12
+		$this->newbieTurns = 0;
13 13
 		$this->lastNewsUpdate			= 0;
14 14
 		$this->dead						= false;
15 15
 		$this->landedOnPlanet			= false;
16
-		$this->lastActive				= 0;
17
-		$this->lastCPLAction			= 0;
18
-		$this->raceID					= (int) $raceID;
19
-		$this->credits					= 0;
20
-		$this->experience				= (int) $experience;
21
-		$this->alignment				= (int) $alignment;
22
-		$this->militaryPayment			= 0;
23
-		$this->allianceID				= (int) $allianceID;
24
-		$this->shipID					= (int) $shipTypeID;
16
+		$this->lastActive = 0;
17
+		$this->lastCPLAction = 0;
18
+		$this->raceID = (int)$raceID;
19
+		$this->credits = 0;
20
+		$this->experience				= (int)$experience;
21
+		$this->alignment = (int)$alignment;
22
+		$this->militaryPayment = 0;
23
+		$this->allianceID				= (int)$allianceID;
24
+		$this->shipID					= (int)$shipTypeID;
25 25
 		$this->kills					= 0;
26 26
 		$this->deaths					= 0;
27
-		$this->lastPort					= 0;
27
+		$this->lastPort = 0;
28 28
 		$this->bank						= 0;
29 29
 		$this->zoom						= 0;
30 30
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	}
49 49
 
50 50
 	public function setAllianceID($ID) {
51
-		if($this->allianceID == $ID)
51
+		if ($this->allianceID == $ID)
52 52
 			return;
53
-		$this->allianceID=$ID;
53
+		$this->allianceID = $ID;
54 54
 	}
55 55
 
56 56
 	public function killPlayerByPlayer(AbstractSmrPlayer $killer) {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		$db = MySqlDatabase::getInstance();
76 76
 		$db->query('REPLACE INTO cached_dummys ' .
77 77
 					'(type, id, info) ' .
78
-					'VALUES (\'DummyPlayer\', '.$db->escapeString($this->getPlayerName()).', '.$db->escapeObject($this).')');
78
+					'VALUES (\'DummyPlayer\', ' . $db->escapeString($this->getPlayerName()) . ', ' . $db->escapeObject($this) . ')');
79 79
 	}
80 80
 
81 81
 	public static function &getCachedDummyPlayer($name) {
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		$db->query('SELECT info FROM cached_dummys
84 84
 					WHERE type = \'DummyPlayer\'
85 85
 						AND id = ' . $db->escapeString($name) . ' LIMIT 1');
86
-		if($db->nextRecord()) {
86
+		if ($db->nextRecord()) {
87 87
 			$return = $db->getObject('info');
88 88
 			return $return;
89 89
 		}
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 		$db->query('SELECT id FROM cached_dummys
99 99
 					WHERE type = \'DummyPlayer\'');
100 100
 		$dummyNames = array();
101
-		while($db->nextRecord()) {
101
+		while ($db->nextRecord()) {
102 102
 			$dummyNames[] = $db->getField('id');
103 103
 		}
104 104
 		return $dummyNames;
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,8 +48,9 @@  discard block
 block discarded – undo
48 48
 	}
49 49
 
50 50
 	public function setAllianceID($ID) {
51
-		if($this->allianceID == $ID)
52
-			return;
51
+		if($this->allianceID == $ID) {
52
+					return;
53
+		}
53 54
 		$this->allianceID=$ID;
54 55
 	}
55 56
 
@@ -86,8 +87,7 @@  discard block
 block discarded – undo
86 87
 		if($db->nextRecord()) {
87 88
 			$return = $db->getObject('info');
88 89
 			return $return;
89
-		}
90
-		else {
90
+		} else {
91 91
 			$return = new DummyPlayer();
92 92
 			return $return;
93 93
 		}
Please login to merge, or discard this patch.