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 ( 184b43...eba83e )
by Dan
05:10
created
engine/Default/rankings_alliance_vs_alliance.php 1 patch
Braces   +17 added lines, -10 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@  discard block
 block discarded – undo
62 62
 			} elseif ($showBold) {
63 63
 				$style = 'class="bold"';
64 64
 			}
65
-		}
66
-		else {
65
+		} else {
67 66
 			$db2->query('SELECT kills FROM alliance_vs_alliance
68 67
 						WHERE alliance_id_2 = ' . $db2->escapeNumber($curr_id) . '
69 68
 							AND alliance_id_1 = ' . $db2->escapeNumber($id) . '
@@ -104,11 +103,15 @@  discard block
 block discarded – undo
104 103
 	if ($id > 0) {
105 104
 		$killer_alliance = SmrAlliance::getAlliance($id, $player->getGameID());
106 105
 		$alliance_name = $killer_alliance->getAllianceDisplayName();
106
+	} elseif ($id == 0) {
107
+		$alliance_name = 'No Alliance';
108
+	} elseif ($id == ALLIANCE_VS_FORCES) {
109
+		$alliance_name = '<span class="yellow">Forces</span>';
110
+	} elseif ($id == ALLIANCE_VS_PLANETS) {
111
+		$alliance_name = '<span class="yellow">Planets</span>';
112
+	} elseif ($id == ALLIANCE_VS_PORTS) {
113
+		$alliance_name = '<span class="yellow">Ports</span>';
107 114
 	}
108
-	elseif ($id == 0) $alliance_name = 'No Alliance';
109
-	elseif ($id == ALLIANCE_VS_FORCES) $alliance_name = '<span class="yellow">Forces</span>';
110
-	elseif ($id == ALLIANCE_VS_PLANETS) $alliance_name = '<span class="yellow">Planets</span>';
111
-	elseif ($id == ALLIANCE_VS_PORTS) $alliance_name = '<span class="yellow">Ports</span>';
112 115
 
113 116
 	$kills[] = [
114 117
 		'Name' => $alliance_name,
@@ -126,11 +129,15 @@  discard block
 block discarded – undo
126 129
 	if ($id > 0) {
127 130
 		$killer_alliance = SmrAlliance::getAlliance($id, $player->getGameID());
128 131
 		$alliance_name = $killer_alliance->getAllianceDisplayName();
132
+	} elseif ($id == 0) {
133
+		$alliance_name = 'No Alliance';
134
+	} elseif ($id == ALLIANCE_VS_FORCES) {
135
+		$alliance_name = '<span class="yellow">Forces</span>';
136
+	} elseif ($id == ALLIANCE_VS_PLANETS) {
137
+		$alliance_name = '<span class="yellow">Planets</span>';
138
+	} elseif ($id == ALLIANCE_VS_PORTS) {
139
+		$alliance_name = '<span class="yellow">Ports</span>';
129 140
 	}
130
-	elseif ($id == 0) $alliance_name = 'No Alliance';
131
-	elseif ($id == ALLIANCE_VS_FORCES) $alliance_name = '<span class="yellow">Forces</span>';
132
-	elseif ($id == ALLIANCE_VS_PLANETS) $alliance_name = '<span class="yellow">Planets</span>';
133
-	elseif ($id == ALLIANCE_VS_PORTS) $alliance_name = '<span class="yellow">Ports</span>';
134 141
 
135 142
 	$deaths[] = [
136 143
 		'Name' => $alliance_name,
Please login to merge, or discard this patch.
engine/Default/shop_hardware_processing.php 1 patch
Braces   +11 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,11 +32,16 @@  discard block
 block discarded – undo
32 32
 	$ship->increaseHardware($hardware_id, $amount);
33 33
 
34 34
 	//HoF
35
-	if ($hardware_id == HARDWARE_COMBAT) $player->increaseHOF($amount, array('Forces', 'Bought', 'Combat Drones'), HOF_ALLIANCE);
36
-	if ($hardware_id == HARDWARE_SCOUT) $player->increaseHOF($amount, array('Forces', 'Bought', 'Scout Drones'), HOF_ALLIANCE);
37
-	if ($hardware_id == HARDWARE_MINE) $player->increaseHOF($amount, array('Forces', 'Bought', 'Mines'), HOF_ALLIANCE);
38
-}
39
-else if ($action == 'Sell') {
35
+	if ($hardware_id == HARDWARE_COMBAT) {
36
+		$player->increaseHOF($amount, array('Forces', 'Bought', 'Combat Drones'), HOF_ALLIANCE);
37
+	}
38
+	if ($hardware_id == HARDWARE_SCOUT) {
39
+		$player->increaseHOF($amount, array('Forces', 'Bought', 'Scout Drones'), HOF_ALLIANCE);
40
+	}
41
+	if ($hardware_id == HARDWARE_MINE) {
42
+		$player->increaseHOF($amount, array('Forces', 'Bought', 'Mines'), HOF_ALLIANCE);
43
+	}
44
+	} else if ($action == 'Sell') {
40 45
 	// We only allow selling combat drones
41 46
 	if ($hardware_id != HARDWARE_COMBAT) {
42 47
 		throw new Exception('This item cannot be sold!');
@@ -49,8 +54,7 @@  discard block
 block discarded – undo
49 54
 
50 55
 	$player->increaseCredits(IRound($cost * CDS_REFUND_PERCENT) * $amount);
51 56
 	$ship->decreaseCDs($amount, true); // 2nd arg avoids under attack warning
52
-}
53
-else {
57
+} else {
54 58
 	throw new Exception('Action must be either Buy or Sell.');
55 59
 }
56 60
 
Please login to merge, or discard this patch.
admin/Default/1.6/universe_create_save_processing.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -104,13 +104,15 @@
 block discarded – undo
104 104
 		$numberOfPlanets = $_POST['type' . $planetTypeID];
105 105
 		for ($i = 1; $i <= $numberOfPlanets; $i++) {
106 106
 			$galSector = $galSectors[array_rand($galSectors)];
107
-			while ($galSector->hasPlanet()) $galSector = $galSectors[array_rand($galSectors)]; //1 per sector
107
+			while ($galSector->hasPlanet()) {
108
+				$galSector = $galSectors[array_rand($galSectors)];
109
+			}
110
+			//1 per sector
108 111
 			$galSector->createPlanet($planetTypeID);
109 112
 		}
110 113
 	}
111 114
 	$var['message'] = '<span class="green">Success</span> : Succesfully added planets.';
112
-}
113
-elseif ($submit == 'Create Ports') {
115
+} elseif ($submit == 'Create Ports') {
114 116
 	$numLevelPorts = [];
115 117
 	for ($i = 1; $i <= SmrPort::MAX_LEVEL; $i++) {
116 118
 		$numLevelPorts[$i] = $_REQUEST['port' . $i] ?? 0;
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.
lib/Default/Routes/RouteGenerator.class.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -167,11 +167,9 @@  discard block
 block discarded – undo
167 167
 		foreach (self::$expRoutes as $multi => $routesByMulti) {
168 168
 			if (count($routesByMulti) + $i < $trimToBestXRoutes) {
169 169
 				$i += count($routesByMulti);
170
-			}
171
-			else if ($i > $trimToBestXRoutes) {
170
+			} else if ($i > $trimToBestXRoutes) {
172 171
 				unset(self::$expRoutes[$multi]);
173
-			}
174
-			else {
172
+			} else {
175 173
 				foreach ($routesByMulti as $key => $value) {
176 174
 					$i++;
177 175
 					if ($i < $trimToBestXRoutes) {
@@ -191,12 +189,10 @@  discard block
 block discarded – undo
191 189
 		foreach (self::$moneyRoutes as $multi => $routesByMulti) {
192 190
 			if (count($routesByMulti) + $i < $trimToBestXRoutes) {
193 191
 				$i += count($routesByMulti);
194
-			}
195
-			else if ($i > $trimToBestXRoutes) {
192
+			} else if ($i > $trimToBestXRoutes) {
196 193
 				unset(self::$moneyRoutes[$multi]);
197 194
 				continue;
198
-			}
199
-			else {
195
+			} else {
200 196
 				foreach ($routesByMulti as $key => $value) {
201 197
 					$i++;
202 198
 					if ($i < $trimToBestXRoutes) {
Please login to merge, or discard this patch.