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
Branch master (0a752f)
by Dan
03:57
created
engine/Default/message_view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@
 block discarded – undo
206 206
 					AND receiver_delete = ' . $db->escapeBoolean(false) . '
207 207
 					ORDER BY send_time DESC');
208 208
 	while ($db->nextRecord()) {
209
-		$groupBox =& $messageBox['GroupedMessages'][$db->getInt('sender_id')];
209
+		$groupBox = & $messageBox['GroupedMessages'][$db->getInt('sender_id')];
210 210
 		// Limit the number of messages in each group
211 211
 		if (!isset($groupBox['Messages']) || count($groupBox['Messages']) < MESSAGE_SCOUT_GROUP_LIMIT) {
212 212
 			displayMessage($groupBox, $db->getField('message_id'), $db->getField('account_id'), $db->getField('sender_id'), stripslashes($db->getField('message_text')), $db->getField('send_time'), $db->getField('msg_read'), MSG_SCOUT);
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.
htdocs/manual.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,8 +5,9 @@  discard block
 block discarded – undo
5 5
 	require_once(ENGINE . 'Default/help.inc');
6 6
 
7 7
 	$topic_id = $_SERVER['QUERY_STRING'];
8
-	if (empty($topic_id) || !is_numeric($topic_id))
9
-		$topic_id = 1;
8
+	if (empty($topic_id) || !is_numeric($topic_id)) {
9
+			$topic_id = 1;
10
+	}
10 11
 	?>
11 12
 <!DOCTYPE html>
12 13
 
@@ -48,8 +49,7 @@  discard block
 block discarded – undo
48 49
 
49 50
 	</body>
50 51
 	</html><?php
51
-}
52
-catch (Throwable $e) {
52
+} catch (Throwable $e) {
53 53
 	handleException($e);
54 54
 }
55 55
 ?>
Please login to merge, or discard this patch.
htdocs/manual_toc.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,8 +68,7 @@
 block discarded – undo
68 68
 
69 69
 	</body>
70 70
 </html><?php
71
-}
72
-catch (Throwable $e) {
71
+} catch (Throwable $e) {
73 72
 	handleException($e);
74 73
 }
75 74
 ?>
Please login to merge, or discard this patch.
htdocs/login_create_processing.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	$account->increaseSmrRewardCredits(2 * CREDITS_PER_DOLLAR); // Give $2 worth of "reward" credits for joining.
158 158
 	if ($socialLogin) {
159 159
 		$account->addAuthMethod($_SESSION['socialLogin']->getLoginType(),
160
-		                        $_SESSION['socialLogin']->getUserID());
160
+								$_SESSION['socialLogin']->getUserID());
161 161
 		if ($validatedBySocial) {
162 162
 			$account->setValidated(true);
163 163
 		}
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
 		// remember when we sent validation code
187 187
 		$db->query('INSERT INTO notification (notification_type, account_id, time) ' .
188
-		           'VALUES(\'validation_code\', ' . $db->escapeNumber($account->getAccountID()) . ', ' . $db->escapeNumber(TIME) . ')');
188
+				   'VALUES(\'validation_code\', ' . $db->escapeNumber($account->getAccountID()) . ', ' . $db->escapeNumber(TIME) . ')');
189 189
 	}
190 190
 
191 191
 	$container = create_container('login_processing.php');
Please login to merge, or discard this patch.
htdocs/album/index.php 1 patch
Braces   +21 added lines, -20 removed lines patch added patch discarded remove patch
@@ -56,36 +56,37 @@
 block discarded – undo
56 56
 						  approved = \'YES\'
57 57
 					ORDER BY hof_name');
58 58
 			
59
-			if ($db2->nextRecord())
60
-				album_entry($db2->getField('album_id'));
61
-			else {
59
+			if ($db2->nextRecord()) {
60
+							album_entry($db2->getField('album_id'));
61
+			} else {
62 62
 				// get all id's and build array
63 63
 				$album_ids = array();
64 64
 		
65
-				while ($db->nextRecord())
66
-					$album_ids[] = $db->getField('album_id');
65
+				while ($db->nextRecord()) {
66
+									$album_ids[] = $db->getField('album_id');
67
+				}
67 68
 		
68 69
 				// double check if we have id's
69
-				if (count($album_ids) > 0)
70
-					search_result($album_ids);
71
-				else
72
-					main_page();
70
+				if (count($album_ids) > 0) {
71
+									search_result($album_ids);
72
+				} else {
73
+									main_page();
74
+				}
73 75
 			}
74 76
 	
77
+		} elseif ($db->getNumRows() == 1) {
78
+			if ($db->nextRecord()) {
79
+							album_entry($db->getField('album_id'));
80
+			} else {
81
+							main_page();
82
+			}
83
+		} else {
84
+					main_page();
75 85
 		}
76
-		elseif ($db->getNumRows() == 1) {
77
-			if ($db->nextRecord())
78
-				album_entry($db->getField('album_id'));
79
-			else
80
-				main_page();
81
-		}
82
-		else
86
+	} else {
83 87
 			main_page();
84 88
 	}
85
-	else
86
-		main_page();
87
-}
88
-catch (Throwable $e) {
89
+	} catch (Throwable $e) {
89 90
 	handleException($e);
90 91
 }
91 92
 ?>
Please login to merge, or discard this patch.
engine/Default/history_games.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 $db = new $var['HistoryDatabase']();
13 13
 $db->query('SELECT start_date, type, end_date, game_name, speed, game_id ' .
14
-           'FROM game WHERE game_id = ' . $db->escapeNumber($game_id));
14
+		   'FROM game WHERE game_id = ' . $db->escapeNumber($game_id));
15 15
 $db->nextRecord();
16 16
 $template->assign('GameName', $game_name);
17 17
 $template->assign('Start', date(DATE_DATE_SHORT, $db->getField('start_date')));
Please login to merge, or discard this patch.
engine/Default/current_sector.php 1 patch
Braces   +19 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,9 +35,13 @@  discard block
 block discarded – undo
35 35
 
36 36
 foreach ($links as $key => $linkArray) {
37 37
 	if ($linkArray['ID'] > 0 && $linkArray['ID'] != $player->getSectorID()) {
38
-		if ($player->getLastSectorID() == $linkArray['ID']) $class = 'lastVisited';
39
-		else if (isset($unvisited[$linkArray['ID']])) $class = 'unvisited';
40
-		else $class = 'visited';
38
+		if ($player->getLastSectorID() == $linkArray['ID']) {
39
+			$class = 'lastVisited';
40
+		} else if (isset($unvisited[$linkArray['ID']])) {
41
+			$class = 'unvisited';
42
+		} else {
43
+			$class = 'visited';
44
+		}
41 45
 		$links[$key]['Class'] = $class;
42 46
 	}
43 47
 }
@@ -80,18 +84,18 @@  discard block
 block discarded – undo
80 84
 if ($player->getNewbieTurns()) {
81 85
 	if ($player->getNewbieTurns() < 25) {
82 86
 		$protectionMessage = '<span class="blue">PROTECTION</span>: You are almost out of <span class="green">NEWBIE</span> protection.';
87
+	} else {
88
+			$protectionMessage = '<span class="blue">PROTECTION</span>: You are under <span class="green">NEWBIE</span> protection.';
83 89
 	}
84
-	else
85
-		$protectionMessage = '<span class="blue">PROTECTION</span>: You are under <span class="green">NEWBIE</span> protection.';
86
-}
87
-elseif ($player->hasFederalProtection()) {
90
+	} elseif ($player->hasFederalProtection()) {
88 91
 	$protectionMessage = '<span class="blue">PROTECTION</span>: You are under <span class="blue">FEDERAL</span> protection.';
89
-}
90
-elseif ($sector->offersFederalProtection())
92
+} elseif ($sector->offersFederalProtection()) {
91 93
 	$protectionMessage = '<span class="blue">PROTECTION</span>: You are <span class="red">NOT</span> under protection.';
94
+}
92 95
 
93
-if (!empty($protectionMessage))
96
+if (!empty($protectionMessage)) {
94 97
 	$template->assign('ProtectionMessage', $protectionMessage);
98
+}
95 99
 
96 100
 //enableProtectionDependantRefresh($template,$player);
97 101
 
@@ -115,7 +119,9 @@  discard block
 block discarded – undo
115 119
 }
116 120
 
117 121
 //error msgs take precedence
118
-if (isset($var['errorMsg'])) $template->assign('ErrorMessage', $var['errorMsg']);
122
+if (isset($var['errorMsg'])) {
123
+	$template->assign('ErrorMessage', $var['errorMsg']);
124
+}
119 125
 
120 126
 // *******************************************
121 127
 // *
@@ -150,8 +156,9 @@  discard block
 block discarded – undo
150 156
 				$remainingTime = $db->getField('refresh_at') - TIME;
151 157
 				$forceRefreshMessage = '<span class="green">REFRESH</span>: All forces will be refreshed in ' . $remainingTime . ' seconds.';
152 158
 				$db->query('REPLACE INTO sector_message (game_id, account_id, message) VALUES (' . $db->escapeNumber($player->getGameID()) . ', ' . $db->escapeNumber($player->getAccountID()) . ', \'[Force Check]\')');
159
+			} else {
160
+				$forceRefreshMessage = '<span class="green">REFRESH</span>: All forces have finished refreshing.';
153 161
 			}
154
-			else $forceRefreshMessage = '<span class="green">REFRESH</span>: All forces have finished refreshing.';
155 162
 			$template->assign('ForceRefreshMessage', $forceRefreshMessage);
156 163
 		}
157 164
 	}
Please login to merge, or discard this patch.
engine/Default/message_delete_processing.php 1 patch
Braces   +9 added lines, -12 removed lines patch added patch discarded remove patch
@@ -19,29 +19,26 @@
 block discarded – undo
19 19
 			while ($db->nextRecord()) {
20 20
 				$message_id_list[] = $db->getInt('message_id');
21 21
 			}
22
-		}
23
-		else {
22
+		} else {
24 23
 			$message_id_list[] = $id;
25 24
 		}
26 25
 	}
27
-	if ($var['folder_id'] == MSG_SENT)
28
-		$db->query('UPDATE message SET sender_delete = ' . $db->escapeBoolean(true) . ' WHERE message_id IN (' . $db->escapeArray($message_id_list) . ')');
29
-	else
30
-		$db->query('UPDATE message SET receiver_delete = ' . $db->escapeBoolean(true) . ' WHERE message_id IN (' . $db->escapeArray($message_id_list) . ')');
31
-}
32
-else {
26
+	if ($var['folder_id'] == MSG_SENT) {
27
+			$db->query('UPDATE message SET sender_delete = ' . $db->escapeBoolean(true) . ' WHERE message_id IN (' . $db->escapeArray($message_id_list) . ')');
28
+	} else {
29
+			$db->query('UPDATE message SET receiver_delete = ' . $db->escapeBoolean(true) . ' WHERE message_id IN (' . $db->escapeArray($message_id_list) . ')');
30
+	}
31
+	} else {
33 32
 	if ($var['folder_id'] == MSG_SCOUT) {
34 33
 		$db->query('UPDATE message SET receiver_delete = ' . $db->escapeBoolean(true) . '
35 34
 					WHERE account_id = ' . $db->escapeNumber($player->getAccountID()) . '
36 35
 						AND message_type_id = '.$db->escapeNumber($var['folder_id']) . '
37 36
 						AND game_id = ' . $db->escapeNumber($player->getGameID()));
38
-	}
39
-	else if ($var['folder_id'] == MSG_SENT) {
37
+	} else if ($var['folder_id'] == MSG_SENT) {
40 38
 		$db->query('UPDATE message SET sender_delete = ' . $db->escapeBoolean(true) . '
41 39
 					WHERE sender_id = ' . $db->escapeNumber($player->getAccountID()) . '
42 40
 						AND game_id = ' . $db->escapeNumber($player->getGameID()));
43
-	}
44
-	else {
41
+	} else {
45 42
 		$db->query('UPDATE message SET receiver_delete = ' . $db->escapeBoolean(true) . '
46 43
 					WHERE account_id = ' . $db->escapeNumber($player->getAccountID()) . '
47 44
 						AND game_id = ' . $db->escapeNumber($player->getGameID()) . '
Please login to merge, or discard this patch.