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

Completed
Push — master ( 389b24...6471f2 )
by Dan
22s queued 16s
created
src/lib/Default/help.inc.php 1 patch
Braces   +30 added lines, -22 removed lines patch added patch discarded remove patch
@@ -22,16 +22,18 @@  discard block
 block discarded – undo
22 22
 		$db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($parent_topic_id) . ' AND order_id = ' . $db2->escapeNumber($order_id - 1));
23 23
 
24 24
 		// no result?
25
-		if (!$db2->getNumRows())
26
-			$db2->query('SELECT * FROM manual WHERE topic_id = ' . $db2->escapeNumber($parent_topic_id));
25
+		if (!$db2->getNumRows()) {
26
+					$db2->query('SELECT * FROM manual WHERE topic_id = ' . $db2->escapeNumber($parent_topic_id));
27
+		}
27 28
 
28 29
 		echo ('<th width="32">');
29 30
 		if ($db2->nextRecord()) {
30 31
 			$previous_topic_id = $db2->getInt('topic_id');
31 32
 			$previous_topic = stripslashes($db2->getField('topic'));
32 33
 			echo ('<a href="/manual.php?' . $previous_topic_id . '"><img src="/images/help/previous.jpg" width="32" height="32" border="0"></a>');
33
-		} else
34
-			echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
34
+		} else {
35
+					echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
36
+		}
35 37
 		echo ('</th>');
36 38
 
37 39
 		// **************************
@@ -43,8 +45,9 @@  discard block
 block discarded – undo
43 45
 			$up_topic_id = $db2->getInt('topic_id');
44 46
 			$up_topic = stripslashes($db2->getField('topic'));
45 47
 			echo ('<a href="/manual.php?' . $up_topic_id . '"><img src="/images/help/up.jpg" width="32" height="32" border="0"></a>');
46
-		} else
47
-			echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
48
+		} else {
49
+					echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
50
+		}
48 51
 		echo ('</th>');
49 52
 
50 53
 		// **************************
@@ -52,8 +55,9 @@  discard block
 block discarded – undo
52 55
 		// **************************
53 56
 		$db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($topic_id) . ' AND order_id = 1');
54 57
 
55
-		if (!$db2->getNumRows())
56
-			$db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($parent_topic_id) . ' AND order_id = ' . $db2->escapeNumber($order_id + 1));
58
+		if (!$db2->getNumRows()) {
59
+					$db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($parent_topic_id) . ' AND order_id = ' . $db2->escapeNumber($order_id + 1));
60
+		}
57 61
 
58 62
 		$seenParentIDs = array(0);
59 63
 		$curr_parent_topic_id = $parent_topic_id;
@@ -72,8 +76,7 @@  discard block
 block discarded – undo
72 76
 			$next_topic_id = $db2->getInt('topic_id');
73 77
 			$next_topic = stripslashes($db2->getField('topic'));
74 78
 			echo ('<a href="/manual.php?' . $next_topic_id . '"><img src="/images/help/next.jpg" width="32" height="32" border="0"></a>');
75
-		}
76
-		else {
79
+		} else {
77 80
 			echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
78 81
 		}
79 82
 		echo ('</th>');
@@ -85,18 +88,22 @@  discard block
 block discarded – undo
85 88
 
86 89
 		echo ('<tr>');
87 90
 		echo ('<td colspan="5">');
88
-		if (isset($previous_topic_id) && $previous_topic_id > 0)
89
-			echo ('<b>Previous:</b> <a href="/manual.php?' . $previous_topic_id . '">' . get_numbering($previous_topic_id) . $previous_topic . '</a>&nbsp;&nbsp;&nbsp;');
90
-		if (isset($up_topic_id) && $up_topic_id > 0)
91
-			echo ('<b>Up:</b> <a href="/manual.php?' . $up_topic_id . '">' . get_numbering($up_topic_id) . $up_topic . '</a>&nbsp;&nbsp;&nbsp;');
92
-		if (isset($next_topic_id) && $next_topic_id > 0)
93
-			echo ('<b>Next:</b> <a href="/manual.php?' . $next_topic_id . '">' . get_numbering($next_topic_id) . $next_topic . '</a>');
91
+		if (isset($previous_topic_id) && $previous_topic_id > 0) {
92
+					echo ('<b>Previous:</b> <a href="/manual.php?' . $previous_topic_id . '">' . get_numbering($previous_topic_id) . $previous_topic . '</a>&nbsp;&nbsp;&nbsp;');
93
+		}
94
+		if (isset($up_topic_id) && $up_topic_id > 0) {
95
+					echo ('<b>Up:</b> <a href="/manual.php?' . $up_topic_id . '">' . get_numbering($up_topic_id) . $up_topic . '</a>&nbsp;&nbsp;&nbsp;');
96
+		}
97
+		if (isset($next_topic_id) && $next_topic_id > 0) {
98
+					echo ('<b>Next:</b> <a href="/manual.php?' . $next_topic_id . '">' . get_numbering($next_topic_id) . $next_topic . '</a>');
99
+		}
94 100
 		echo ('</tr>');
95 101
 
96 102
 		echo ('</table>');
97
-	} else
98
-		echo ('Invalid Topic!');
99
-}
103
+	} else {
104
+			echo ('Invalid Topic!');
105
+	}
106
+	}
100 107
 
101 108
 function echo_content($topic_id) {
102 109
 	// database object
@@ -114,9 +121,10 @@  discard block
 block discarded – undo
114 121
 		echo ('<h1>' . get_numbering($topic_id) . $topic . '</h1>');
115 122
 		echo ('<p>' . $text . '<p>');
116 123
 		echo ('</div>');
117
-	} else
118
-		echo ('Invalid Topic!');
119
-}
124
+	} else {
125
+			echo ('Invalid Topic!');
126
+	}
127
+	}
120 128
 
121 129
 function echo_subsection($topic_id) {
122 130
 	// database object
Please login to merge, or discard this patch.
src/lib/Default/SmrPlanet.class.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -735,7 +735,7 @@
 block discarded – undo
735 735
 		if ($buildingTypeID === null) {
736 736
 			$structs = $this->typeInfo::STRUCTURES;
737 737
 			return array_combine(array_keys($structs),
738
-			                     array_column($structs, 'max_amount'));
738
+								 array_column($structs, 'max_amount'));
739 739
 		}
740 740
 		return $this->getStructureTypes($buildingTypeID)->maxAmount();
741 741
 	}
Please login to merge, or discard this patch.
test/SmrTest/lib/DefaultGame/SmrPlanetIntegrationTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -230,13 +230,13 @@
 block discarded – undo
230 230
 		$planet->increaseBuilding(PLANET_HANGAR, 4);
231 231
 		$this->assertTrue($planet->hasBuilding(PLANET_HANGAR));
232 232
 		$this->assertSame(4, $planet->getBuilding(PLANET_HANGAR));
233
-		$this->assertSame(4/3, $planet->getLevel());
233
+		$this->assertSame(4 / 3, $planet->getLevel());
234 234
 
235 235
 		// Destroy some hangars
236 236
 		$planet->destroyBuilding(PLANET_HANGAR, 2);
237 237
 		$this->assertTrue($planet->hasBuilding(PLANET_HANGAR));
238 238
 		$this->assertSame(2, $planet->getBuilding(PLANET_HANGAR));
239
-		$this->assertSame(2/3, $planet->getLevel());
239
+		$this->assertSame(2 / 3, $planet->getLevel());
240 240
 	}
241 241
 
242 242
 }
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
@@ -912,14 +912,14 @@
 block discarded – undo
912 912
 
913 913
 	public function isFederal() : bool {
914 914
 		return $this->getShipTypeID() === SHIP_TYPE_FEDERAL_DISCOVERY ||
915
-		       $this->getShipTypeID() === SHIP_TYPE_FEDERAL_WARRANT ||
916
-		       $this->getShipTypeID() === SHIP_TYPE_FEDERAL_ULTIMATUM;
915
+			   $this->getShipTypeID() === SHIP_TYPE_FEDERAL_WARRANT ||
916
+			   $this->getShipTypeID() === SHIP_TYPE_FEDERAL_ULTIMATUM;
917 917
 	}
918 918
 
919 919
 	public function isUnderground() : bool {
920 920
 		return $this->getShipTypeID() === SHIP_TYPE_THIEF ||
921
-		       $this->getShipTypeID() === SHIP_TYPE_ASSASSIN ||
922
-		       $this->getShipTypeID() === SHIP_TYPE_DEATH_CRUISER;
921
+			   $this->getShipTypeID() === SHIP_TYPE_ASSASSIN ||
922
+			   $this->getShipTypeID() === SHIP_TYPE_DEATH_CRUISER;
923 923
 	}
924 924
 
925 925
 	public function shootPlayers(array $targetPlayers) : array {
Please login to merge, or discard this patch.
test/SmrTest/lib/DefaultGame/AbstractSmrShipTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
 		$ship = new AbstractSmrShip($this->player);
101 101
 		$this->expectException(\Exception::class);
102 102
 		$this->expectExceptionMessage('Ship does not have the supported hardware!');
103
-		$ship->setIllusion(SHIP_TYPE_THIEF, 12, 13);;
103
+		$ship->setIllusion(SHIP_TYPE_THIEF, 12, 13); ;
104 104
 	}
105 105
 
106 106
 	public function test_hardware() {
Please login to merge, or discard this patch.
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.