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
Branch master (287493)
by Dan
06:08
created
engine/Default/map_local.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@  discard block
 block discarded – undo
6 6
 //
7 7
 ////////////////////////////////////////////////////////////
8 8
 
9
-if($player->isLandedOnPlanet())
9
+if($player->isLandedOnPlanet()) {
10 10
 	create_error('You are on a planet!');
11
+}
11 12
 
12 13
 // Create a session to store temporary display options
13 14
 // Do not garbage collect here for best performance (see map_galaxy.php).
@@ -36,8 +37,7 @@  discard block
 block discarded – undo
36 37
 	$zoomOn = true;
37 38
 	if ($var['Dir'] == 'Up') {
38 39
 		$player->decreaseZoom(1);
39
-	}
40
-	elseif ($var['Dir'] == 'Down') {
40
+	} elseif ($var['Dir'] == 'Down') {
41 41
 		$player->increaseZoom(1);
42 42
 	}
43 43
 }
Please login to merge, or discard this patch.
engine/Default/rankings_race_kills.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,11 @@
 block discarded – undo
8 8
 $db->query('SELECT race_id, race_name, sum(kills) as kill_sum FROM player JOIN race USING(race_id) WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' GROUP BY race_id ORDER BY kill_sum DESC, race_name ASC');
9 9
 while ($db->nextRecord()) {
10 10
 	$race_id = $db->getInt('race_id');
11
-	if ($player->getRaceID() == $race_id) $style = ' class="bold"';
12
-	else $style = '';
11
+	if ($player->getRaceID() == $race_id) {
12
+		$style = ' class="bold"';
13
+	} else {
14
+		$style = '';
15
+	}
13 16
 
14 17
 	$ranks[] = [
15 18
 		'style' => $style,
Please login to merge, or discard this patch.
engine/Default/council_vote_processing.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 if ($action == 'INCREASE') {
10 10
 	$action = 'INC';
11
-}
12
-elseif ($action == 'DECREASE') {
11
+} elseif ($action == 'DECREASE') {
13 12
 	$action = 'DEC';
14 13
 }
15 14
 
@@ -19,13 +18,11 @@  discard block
 block discarded – undo
19 18
 	$db->query('REPLACE INTO player_votes_relation
20 19
 				(account_id, game_id, race_id_1, race_id_2, action, time)
21 20
 				VALUES(' . $db->escapeNumber($player->getAccountID()) . ', ' . $db->escapeNumber($player->getGameID()) . ', ' . $db->escapeNumber($player->getRaceID()) . ', '.$db->escapeNumber($race_id).', '.$db->escapeString($action).', '.$db->escapeNumber(TIME).')');
22
-}
23
-elseif ($action == 'YES' || $action == 'NO') {
21
+} elseif ($action == 'YES' || $action == 'NO') {
24 22
 	$db->query('REPLACE INTO player_votes_pact
25 23
 			(account_id, game_id, race_id_1, race_id_2, vote)
26 24
 			VALUES(' . $db->escapeNumber($player->getAccountID()) . ', ' . $db->escapeNumber($player->getGameID()) . ', ' . $db->escapeNumber($player->getRaceID()) . ', '.$db->escapeNumber($race_id).', '.$db->escapeString($action).')');
27
-}
28
-elseif ($action == 'VETO') {
25
+} elseif ($action == 'VETO') {
29 26
 	// try to cancel both votings
30 27
 	$db->query('DELETE FROM race_has_voting ' .
31 28
 			'WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . '
Please login to merge, or discard this patch.
engine/Default/note_add_processing.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@
 block discarded – undo
13 13
  
14 14
 if(isset($_REQUEST['note'])) {
15 15
 	$note = $_REQUEST['note'];
16
-	if(strlen($note) > 1000)
17
-		create_error('Note cannot be longer than 1000 characters.');
16
+	if(strlen($note) > 1000) {
17
+			create_error('Note cannot be longer than 1000 characters.');
18
+	}
18 19
 
19 20
 	$note = htmlentities($note,ENT_QUOTES,'utf-8');
20 21
 	$note = nl2br($note);
Please login to merge, or discard this patch.
engine/Default/feature_request_vote_processing.php 1 patch
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,20 +10,22 @@
 block discarded – undo
10 10
 		}
11 11
 		$db->query(substr($query,0,-1));
12 12
 	}
13
-	if(!empty($_REQUEST['favourite']) && is_numeric($_REQUEST['favourite']))
14
-		$db->query('REPLACE INTO account_votes_for_feature VALUES('.$db->escapeNumber($account->getAccountID()).', '.$db->escapeNumber($_REQUEST['favourite']).',\'FAVOURITE\')');
13
+	if(!empty($_REQUEST['favourite']) && is_numeric($_REQUEST['favourite'])) {
14
+			$db->query('REPLACE INTO account_votes_for_feature VALUES('.$db->escapeNumber($account->getAccountID()).', '.$db->escapeNumber($_REQUEST['favourite']).',\'FAVOURITE\')');
15
+	}
15 16
 
16 17
 	forward(create_container('skeleton.php', 'feature_request.php'));
17
-}
18
-else if($_REQUEST['action']=='Set Status') {
18
+} else if($_REQUEST['action']=='Set Status') {
19 19
 	if(empty($_REQUEST['status'])) {
20 20
 		create_error('You have to select a status to set');
21 21
 	}
22 22
 	$status = $_REQUEST['status'];
23
-	if(empty($_REQUEST['set_status_ids']))
24
-		create_error('You have to select a feature');
25
-	if(!$account->hasPermission(PERMISSION_MODERATE_FEATURE_REQUEST))
26
-		create_error('You do not have permission to do that');
23
+	if(empty($_REQUEST['set_status_ids'])) {
24
+			create_error('You have to select a feature');
25
+	}
26
+	if(!$account->hasPermission(PERMISSION_MODERATE_FEATURE_REQUEST)) {
27
+			create_error('You do not have permission to do that');
28
+	}
27 29
 
28 30
 	$db->query('UPDATE feature_request fr SET status = ' . $db->escapeString($status) . '
29 31
 			, fav = (
Please login to merge, or discard this patch.
engine/Default/alliance_roster.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,7 @@
 block discarded – undo
70 70
 	$container = create_container('skeleton.php', 'alliance_roster.php');
71 71
 	if($showRoles) {
72 72
 		$container['action'] = 'Hide Alliance Roles';
73
-	}
74
-	else {
73
+	} else {
75 74
 		$container['action'] = 'Show Alliance Roles';
76 75
 	}
77 76
 	$template->assign('ToggleRolesHREF', SmrSession::getNewHREF($container));
Please login to merge, or discard this patch.
engine/Default/message_notify_processing.php 1 patch
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,24 +1,28 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if ($_POST['action'] == 'No')
3
+if ($_POST['action'] == 'No') {
4 4
 	forward(create_container('skeleton.php', 'message_view.php'));
5
+}
5 6
 
6
-if (empty($var['message_id']))
7
+if (empty($var['message_id'])) {
7 8
 	create_error('Please click the small yellow icon to report a message!');
9
+}
8 10
 
9 11
 // get next id
10 12
 $db->query('SELECT max(notify_id) FROM message_notify WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY notify_id DESC');
11
-if ($db->nextRecord())
13
+if ($db->nextRecord()) {
12 14
 	$notify_id = $db->getField('max(notify_id)') + 1;
13
-else
15
+} else {
14 16
 	$notify_id = 1;
17
+}
15 18
 
16 19
 // get message form db
17 20
 $db->query('SELECT account_id, sender_id, message_text
18 21
 			FROM message
19 22
 			WHERE message_id = ' . $var['message_id'].' AND receiver_delete = \'FALSE\'');
20
-if (!$db->nextRecord())
23
+if (!$db->nextRecord()) {
21 24
 	create_error('Could not find the message you selected!');
25
+}
22 26
 
23 27
 // insert
24 28
 $db->query('INSERT INTO message_notify
Please login to merge, or discard this patch.
engine/Default/alliance_message_add_processing.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@  discard block
 block discarded – undo
7 7
 	$container = create_container('skeleton.php', '', $var);
8 8
 	if(!isset($var['thread_index'])) {
9 9
 		$container['body'] = 'alliance_message.php';
10
-	}
11
-	else {
10
+	} else {
12 11
 		$container['body'] = 'alliance_message_view.php';
13 12
 	}
14 13
 	$container['preview'] = $body;
@@ -40,8 +39,7 @@  discard block
 block discarded – undo
40 39
 	if ($db->nextRecord()) {
41 40
 		$thread_id = $db->getInt('max(thread_id)') + 1;
42 41
 	}
43
-}
44
-else {
42
+} else {
45 43
 	$thread_index = $var['thread_index'];
46 44
 	$thread_id = $var['thread_ids'][$thread_index];
47 45
 }
@@ -97,8 +95,7 @@  discard block
 block discarded – undo
97 95
 	$container['thread_topics'] = $var['thread_topics'];
98 96
 	++$var['thread_replies'][$thread_index];
99 97
 	$container['thread_replies'] = $var['thread_replies'];
100
-}
101
-else {
98
+} else {
102 99
 	$container['body'] = 'alliance_message.php';
103 100
 }
104 101
 
Please login to merge, or discard this patch.
engine/Default/bar_galmap_buy.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@
 block discarded – undo
46 46
 	transfer('LocationID');
47 47
 	$container['message'] = '<div align="center">Galaxy maps have been added. Enjoy!</div><br />';
48 48
 	forward($container);
49
-}
50
-else {
49
+} else {
51 50
 	// This is a display page!
52 51
 	$template->assign('PageTopic', 'Buy Galaxy Maps');
53 52
 	Menu::bar();
Please login to merge, or discard this patch.