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/bar_buy_drink_processing.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
 
10 10
 if (isset($var['action']) && $var['action'] != 'drink') {
11 11
 	$drinkName = 'water';
12
-	$message.= 'You ask the bartender for some water and you quickly down it.<br />You don\'t feel quite so intoxicated anymore.<br />';
12
+	$message .= 'You ask the bartender for some water and you quickly down it.<br />You don\'t feel quite so intoxicated anymore.<br />';
13 13
 	$db->query('DELETE FROM player_has_drinks WHERE game_id=' . $db->escapeNumber($player->getGameID()) . ' AND account_id=' . $db->escapeNumber($player->getAccountID()) . ' LIMIT 1');
14
-	$player->increaseHOF(1,array('Bar','Drinks', 'Water'), HOF_PUBLIC);
14
+	$player->increaseHOF(1, array('Bar', 'Drinks', 'Water'), HOF_PUBLIC);
15 15
 }
16 16
 else {
17 17
 	$random = mt_rand(1, 20);
@@ -35,30 +35,30 @@  discard block
 block discarded – undo
35 35
 			$curr_drink_id = 1;
36 36
 		}
37 37
 
38
-		if ($drink_id != 11 && $drink_id !=1) {
39
-			$message.=('You have bought a '.$drinkName.' for $10');
38
+		if ($drink_id != 11 && $drink_id != 1) {
39
+			$message .= ('You have bought a ' . $drinkName . ' for $10');
40 40
 			$db->query('INSERT INTO player_has_drinks (account_id, game_id, drink_id, time) VALUES (' . $db->escapeNumber($player->getAccountID()) . ', ' . $db->escapeNumber($player->getGameID()) . ', ' . $db->escapeNumber($curr_drink_id) . ', ' . $db->escapeNumber(TIME) . ')');
41
-			$player->increaseHOF(1,array('Bar','Drinks', 'Alcoholic'), HOF_PUBLIC);
41
+			$player->increaseHOF(1, array('Bar', 'Drinks', 'Alcoholic'), HOF_PUBLIC);
42 42
 		}
43 43
 		else {
44
-			$message.=('The bartender says, Ive got something special for ya.<br />');
45
-			$message.=('The bartender turns around for a minute and whips up a '.$drinkName.'.<br />');
44
+			$message .= ('The bartender says, Ive got something special for ya.<br />');
45
+			$message .= ('The bartender turns around for a minute and whips up a ' . $drinkName . '.<br />');
46 46
 
47 47
 			if ($drink_id == 1) {
48
-				$message.=('The bartender says that Spock himself gave him the directions to make this drink.<br />');
48
+				$message .= ('The bartender says that Spock himself gave him the directions to make this drink.<br />');
49 49
 			}
50 50
 
51
-			$message.=('You drink the '.$drinkName.' and feel like like you have been drinking for hours.<br />');
51
+			$message .= ('You drink the ' . $drinkName . ' and feel like like you have been drinking for hours.<br />');
52 52
 
53 53
 			if ($drink_id == 11) {
54
-				$message.=('After drinking the '.$drinkName.' you feel like nothing can bring you down and like you are the best trader in the universe.<br />');
54
+				$message .= ('After drinking the ' . $drinkName . ' you feel like nothing can bring you down and like you are the best trader in the universe.<br />');
55 55
 			}
56 56
 
57 57
 			//has the power of 2 drinks
58 58
 			$db->query('INSERT INTO player_has_drinks (account_id, game_id, drink_id, time) VALUES (' . $db->escapeNumber($player->getAccountID()) . ', ' . $db->escapeNumber($player->getGameID()) . ', ' . $db->escapeNumber($curr_drink_id) . ', ' . $db->escapeNumber(TIME) . ')');
59 59
 			$curr_drink_id++;
60 60
 			$db->query('INSERT INTO player_has_drinks (account_id, game_id, drink_id, time) VALUES (' . $db->escapeNumber($player->getAccountID()) . ', ' . $db->escapeNumber($player->getGameID()) . ', ' . $db->escapeNumber($curr_drink_id) . ', ' . $db->escapeNumber(TIME) . ')');
61
-			$player->increaseHOF(1,array('Bar','Drinks', 'Special'), HOF_PUBLIC);
61
+			$player->increaseHOF(1, array('Bar', 'Drinks', 'Special'), HOF_PUBLIC);
62 62
 		}
63 63
 
64 64
 	}
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	$db->nextRecord();
67 67
 	$num_drinks = $db->getInt('count(*)');
68 68
 	//display woozy message
69
-	$message.= '<br />You feel a little W'.str_repeat('oO', $num_drinks).'zy<br />';
69
+	$message .= '<br />You feel a little W' . str_repeat('oO', $num_drinks) . 'zy<br />';
70 70
 }
71 71
 
72 72
 $player->actionTaken('BuyDrink', array(
@@ -76,22 +76,22 @@  discard block
 block discarded – undo
76 76
 
77 77
 //see if the player blacksout or not
78 78
 if (isset($num_drinks) && $num_drinks > 15) {
79
-	$percent = mt_rand(1,25);
79
+	$percent = mt_rand(1, 25);
80 80
 	$lostCredits = round($player->getCredits() * $percent / 100);
81 81
 
82
-	$message.= '<span class="red">You decide you need to go to the restroom.  So you stand up and try to start walking but immediately collapse!<br />About 10 minutes later you wake up and find yourself missing ' . number_format($lostCredits) . ' credits</span><br />';
82
+	$message .= '<span class="red">You decide you need to go to the restroom.  So you stand up and try to start walking but immediately collapse!<br />About 10 minutes later you wake up and find yourself missing ' . number_format($lostCredits) . ' credits</span><br />';
83 83
 
84 84
 	$player->decreaseCredits($lostCredits);
85
-	$player->increaseHOF(1,array('Bar','Robbed','Number Of Times'), HOF_PUBLIC);
86
-	$player->increaseHOF($lostCredits,array('Bar','Robbed','Money Lost'), HOF_PUBLIC);
85
+	$player->increaseHOF(1, array('Bar', 'Robbed', 'Number Of Times'), HOF_PUBLIC);
86
+	$player->increaseHOF($lostCredits, array('Bar', 'Robbed', 'Money Lost'), HOF_PUBLIC);
87 87
 
88 88
 	$db->query('DELETE FROM player_has_drinks WHERE game_id=' . $db->escapeNumber($player->getGameID()) . ' AND account_id=' . $db->escapeNumber($player->getAccountID()));
89 89
 
90 90
 }
91
-$player->increaseHOF(1,array('Bar','Drinks', 'Total'), HOF_PUBLIC);
92
-$message.= '</div>';
91
+$player->increaseHOF(1, array('Bar', 'Drinks', 'Total'), HOF_PUBLIC);
92
+$message .= '</div>';
93 93
 
94
-$container=create_container('skeleton.php','bar_main.php');
94
+$container = create_container('skeleton.php', 'bar_main.php');
95 95
 transfer('LocationID');
96 96
 $container['message'] = $message;
97 97
 forward($container);
Please login to merge, or discard this patch.
engine/Default/alliance_treaties.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 		}
26 26
 	}
27 27
 	$otherAllianceID = $db->getInt('alliance_id_1');
28
-	$container=create_container('alliance_treaties_processing.php','');
28
+	$container = create_container('alliance_treaties_processing.php', '');
29 29
 	$container['alliance_id_1'] = $otherAllianceID;
30 30
 	$container['aa_access'] = $db->getField('aa_access');
31 31
 	$container['accept'] = true;
Please login to merge, or discard this patch.
engine/Default/council_politics.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,22 +5,22 @@
 block discarded – undo
5 5
 }
6 6
 $raceID = $var['race_id'];
7 7
 
8
-$template->assign('PageTopic','Ruling Council Of ' . Globals::getRaceName($raceID));
8
+$template->assign('PageTopic', 'Ruling Council Of ' . Globals::getRaceName($raceID));
9 9
 
10 10
 // echo menu
11 11
 Menu::council($raceID);
12 12
 
13
-$raceRelations = Globals::getRaceRelations($player->getGameID(),$raceID);
13
+$raceRelations = Globals::getRaceRelations($player->getGameID(), $raceID);
14 14
 
15 15
 $peaceRaces = array();
16 16
 $neutralRaces = array();
17 17
 $warRaces = array();
18 18
 foreach (Globals::getRaces() as $otherRaceID => $raceInfo) {
19
-	if($otherRaceID != RACE_NEUTRAL && $raceID != $otherRaceID) {
20
-		if($raceRelations[$otherRaceID] >= RELATIONS_PEACE) {
19
+	if ($otherRaceID != RACE_NEUTRAL && $raceID != $otherRaceID) {
20
+		if ($raceRelations[$otherRaceID] >= RELATIONS_PEACE) {
21 21
 			$peaceRaces[$otherRaceID] = $raceInfo;
22 22
 		}
23
-		else if($raceRelations[$otherRaceID] <= RELATIONS_WAR) {
23
+		else if ($raceRelations[$otherRaceID] <= RELATIONS_WAR) {
24 24
 			$warRaces[$otherRaceID] = $raceInfo;
25 25
 		}
26 26
 		else {
Please login to merge, or discard this patch.
engine/Default/underground.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 	create_error('You are not allowed to come in here!');
5 5
 }
6 6
 
7
-if(!$player->getSector()->hasLocation($var['LocationID'])) {
7
+if (!$player->getSector()->hasLocation($var['LocationID'])) {
8 8
 	create_error('That location does not exist in this sector');
9 9
 }
10 10
 $location = SmrLocation::getLocation($var['LocationID']);
11
-if(!$location->isUG()) {
11
+if (!$location->isUG()) {
12 12
 	create_error('There is no underground here.');
13 13
 }
14 14
 
Please login to merge, or discard this patch.
engine/Default/galactic_post_make_paper_processing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 else
7 7
 	$num = 1;
8 8
 $title = $_REQUEST['title'];
9
-$db->query('INSERT INTO galactic_post_paper (game_id, paper_id, title) VALUES (' . $db->escapeNumber($player->getGameID()) . ', '.$db->escapeNumber($num).', '.$db->escapeString($title).')');
9
+$db->query('INSERT INTO galactic_post_paper (game_id, paper_id, title) VALUES (' . $db->escapeNumber($player->getGameID()) . ', ' . $db->escapeNumber($num) . ', ' . $db->escapeString($title) . ')');
10 10
 //send em back
11 11
 $container = array();
12 12
 $container['url'] = 'skeleton.php';
Please login to merge, or discard this patch.
engine/Default/preferences_processing.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	if (empty($HoF_name) || $HoF_name == '') create_error('You Hall of Fame name must contain characters!');
66 66
 
67 67
 	//no duplicates
68
-	$db->query('SELECT * FROM account WHERE hof_name = ' . $db->escapeString($HoF_name) . ' AND account_id != '.$db->escapeNumber($account->getAccountID()).' LIMIT 1');
68
+	$db->query('SELECT * FROM account WHERE hof_name = ' . $db->escapeString($HoF_name) . ' AND account_id != ' . $db->escapeNumber($account->getAccountID()) . ' LIMIT 1');
69 69
 	if ($db->nextRecord()) create_error('Someone is already using that name!');
70 70
 
71 71
 	// set the HoF name in account stat
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 	} else {
84 84
 		// no duplicates
85
-		$db->query('SELECT * FROM account WHERE discord_id =' . $db->escapeString($discordId) . ' AND account_id != '.$db->escapeNumber($account->getAccountID()).' LIMIT 1');
85
+		$db->query('SELECT * FROM account WHERE discord_id =' . $db->escapeString($discordId) . ' AND account_id != ' . $db->escapeNumber($account->getAccountID()) . ' LIMIT 1');
86 86
 		if ($db->nextRecord()) create_error('Someone is already using that Discord User ID!');
87 87
 
88 88
 		$account->setDiscordId($discordId);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	} else {
107 107
 
108 108
 		// no duplicates
109
-		$db->query('SELECT * FROM account WHERE irc_nick = ' . $db->escapeString($ircNick) . ' AND account_id != '.$db->escapeNumber($account->getAccountID()).' LIMIT 1');
109
+		$db->query('SELECT * FROM account WHERE irc_nick = ' . $db->escapeString($ircNick) . ' AND account_id != ' . $db->escapeNumber($account->getAccountID()) . ' LIMIT 1');
110 110
 		if ($db->nextRecord()) create_error('Someone is already using that nick!');
111 111
 
112 112
 		// save irc nick in db and set message
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	if (!is_numeric($timez))
135 135
 		create_error('Numbers only please');
136 136
 
137
-	$db->query('UPDATE account SET offset = '.$db->escapeNumber($timez).' WHERE account_id = '.$db->escapeNumber($account->getAccountID()));
137
+	$db->query('UPDATE account SET offset = ' . $db->escapeNumber($timez) . ' WHERE account_id = ' . $db->escapeNumber($account->getAccountID()));
138 138
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your time offset.';
139 139
 }
140 140
 elseif ($action == 'Change Date Formats') {
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your ship images preferences.';
148 148
 }
149 149
 elseif ($action == 'Change Centering') {
150
-	$account->setCenterGalaxyMapOnPlayer($_REQUEST['centergalmap']=='Yes');
150
+	$account->setCenterGalaxyMapOnPlayer($_REQUEST['centergalmap'] == 'Yes');
151 151
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your centering galaxy map preferences.';
152 152
 }
153 153
 else if ($action == 'Change Size' && is_numeric($_REQUEST['fontsize']) && $_REQUEST['fontsize'] >= 50) {
@@ -167,22 +167,22 @@  discard block
 block discarded – undo
167 167
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your CSS options.';
168 168
 }
169 169
 else if ($action == 'Change Kamikaze Setting') {
170
-	$player->setCombatDronesKamikazeOnMines($_REQUEST['kamikaze']=='Yes');
170
+	$player->setCombatDronesKamikazeOnMines($_REQUEST['kamikaze'] == 'Yes');
171 171
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your combat drones options.';
172 172
 }
173 173
 else if ($action == 'Change Message Setting') {
174
-	$player->setForceDropMessages($_REQUEST['forceDropMessages']=='Yes');
174
+	$player->setForceDropMessages($_REQUEST['forceDropMessages'] == 'Yes');
175 175
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your message options.';
176 176
 }
177 177
 else if ($action == 'Save Hotkeys') {
178
-	foreach(AbstractSmrAccount::getDefaultHotkeys() as $hotkey => $binding) {
179
-		if(isset($_REQUEST[$hotkey])) {
178
+	foreach (AbstractSmrAccount::getDefaultHotkeys() as $hotkey => $binding) {
179
+		if (isset($_REQUEST[$hotkey])) {
180 180
 			$account->setHotkey($hotkey, explode(' ', $_REQUEST[$hotkey]));
181 181
 		}
182 182
 	}
183 183
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have saved your hotkeys.';
184 184
 }
185
-else if (strpos(trim($action),'Alter Player')===0) {
185
+else if (strpos(trim($action), 'Alter Player') === 0) {
186 186
 	// trim input now
187 187
 	$player_name = trim($_POST['PlayerName']);
188 188
 
@@ -218,13 +218,13 @@  discard block
 block discarded – undo
218 218
 	// Check if name is in use.
219 219
 	// The player_name field has case-insensitive collation, so check against ID
220 220
 	// to allow player to change the case of their name.
221
-	$db->query('SELECT 1 FROM player WHERE game_id=' . $db->escapeNumber($player->getGameID()) . ' AND player_name=' . $db->escapeString($player_name) . ' AND player_id != ' . $db->escapeString($player->getPlayerID()) . ' LIMIT 1' );
221
+	$db->query('SELECT 1 FROM player WHERE game_id=' . $db->escapeNumber($player->getGameID()) . ' AND player_name=' . $db->escapeString($player_name) . ' AND player_id != ' . $db->escapeString($player->getPlayerID()) . ' LIMIT 1');
222 222
 	if ($db->getNumRows()) {
223 223
 		create_error('Name is already being used in this game!');
224 224
 	}
225 225
 
226
-	if($player->isNameChanged()) {
227
-		if($account->getTotalSmrCredits()<CREDITS_PER_NAME_CHANGE) {
226
+	if ($player->isNameChanged()) {
227
+		if ($account->getTotalSmrCredits() < CREDITS_PER_NAME_CHANGE) {
228 228
 			create_error('You do not have enough credits to change your name.');
229 229
 		}
230 230
 		$account->decreaseTotalSmrCredits(CREDITS_PER_NAME_CHANGE);
Please login to merge, or discard this patch.
engine/Default/alliance_message.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if (!isset($var['alliance_id'])) {
3
-	SmrSession::updateVar('alliance_id',$player->getAllianceID());
3
+	SmrSession::updateVar('alliance_id', $player->getAllianceID());
4 4
 }
5 5
 
6 6
 $alliance = SmrAlliance::getAlliance($var['alliance_id'], $player->getGameID());
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	$container = create_container('alliance_message_delete_processing.php');
42 42
 	$container['alliance_id'] = $alliance->getAllianceID();
43 43
 
44
-	$i=0;
44
+	$i = 0;
45 45
 	$alliance_eyes = array();
46 46
 	while ($db->nextRecord()) {
47 47
 		$threadID = $db->getInt('thread_id');
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 						AND alliance_thread.thread_id=' . $db2->escapeNumber($threadID) . '
83 83
 						AND alliance_thread.reply_id=1 LIMIT 1
84 84
 						');
85
-			if($db2->nextRecord()) {
85
+			if ($db2->nextRecord()) {
86 86
 				$sender_id = $db2->getInt('sender_id');
87 87
 				$author = SmrPlayer::getPlayer($sender_id, $player->getGameID());
88 88
 				$playerName = $author->getLinkedDisplayName(false);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		$db2->query('SELECT * FROM player_has_alliance_role JOIN alliance_has_roles USING(game_id,alliance_id,role_id) WHERE account_id = ' . $db->escapeNumber($player->getAccountID()) . ' AND game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND alliance_id=' . $db->escapeNumber($alliance->getAllianceID()) . ' LIMIT 1');
94 94
 		$db2->nextRecord();
95 95
 		$threads[$i]['CanDelete'] = $player->getAccountID() == $sender_id || $db2->getBoolean('mb_messages');
96
-		if($threads[$i]['CanDelete']) {
96
+		if ($threads[$i]['CanDelete']) {
97 97
 			$container['thread_id'] = $threadID;
98 98
 			$threads[$i]['DeleteHref'] = SmrSession::getNewHREF($container);
99 99
 		}
@@ -103,31 +103,31 @@  discard block
 block discarded – undo
103 103
 		++$i;
104 104
 	}
105 105
 
106
-	$container = create_container('skeleton.php','alliance_message_view.php');
106
+	$container = create_container('skeleton.php', 'alliance_message_view.php');
107 107
 	$container['alliance_id'] = $alliance->getAllianceID();
108 108
 	$container['thread_ids'] = $thread_ids;
109 109
 	$container['thread_topics'] = $thread_topics;
110 110
 	$container['thread_replies'] = $thread_replies;
111 111
 	$container['alliance_eyes'] = $alliance_eyes;
112
-	for($j=0;$j<$i;$j++) {
112
+	for ($j = 0; $j < $i; $j++) {
113 113
 		$container['thread_index'] = $j;
114 114
 		$threads[$j]['ViewHref'] = SmrSession::getNewHREF($container);
115 115
 	}
116 116
 }
117
-$template->assign('Threads',$threads);
117
+$template->assign('Threads', $threads);
118 118
 
119 119
 if ($mbWrite || in_array($player->getAccountID(), Globals::getHiddenPlayers())) {
120 120
 	$container = create_container('alliance_message_add_processing.php');
121 121
 	$container['alliance_id'] = $alliance->getAllianceID();
122
-	$template->assign('CreateNewThreadFormHref',SmrSession::getNewHREF($container));
122
+	$template->assign('CreateNewThreadFormHref', SmrSession::getNewHREF($container));
123 123
 }
124 124
 
125
-if(isset($var['preview'])) {
125
+if (isset($var['preview'])) {
126 126
 	$template->assign('Preview', $var['preview']);
127 127
 }
128
-if(isset($var['topic'])) {
128
+if (isset($var['topic'])) {
129 129
 	$template->assign('Topic', $var['topic']);
130 130
 }
131
-if(isset($var['AllianceEyesOnly'])) {
131
+if (isset($var['AllianceEyesOnly'])) {
132 132
 	$template->assign('AllianceEyesOnly', $var['AllianceEyesOnly']);
133 133
 }
Please login to merge, or discard this patch.
engine/Default/alliance_option.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 if (!isset($var['alliance_id'])) {
3
-	SmrSession::updateVar('alliance_id',$player->getAllianceID());
3
+	SmrSession::updateVar('alliance_id', $player->getAllianceID());
4 4
 }
5 5
 
6 6
 $alliance = SmrAlliance::getAlliance($var['alliance_id'], $player->getGameID());
Please login to merge, or discard this patch.
engine/Default/leave_newbie.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,2 +1,2 @@
 block discarded – undo
1 1
 <?php
2
-$template->assign('PageTopic','Leave Newbie Protection');
2
+$template->assign('PageTopic', 'Leave Newbie Protection');
Please login to merge, or discard this patch.