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 ( 3938d8...8d8584 )
by Dan
29s queued 20s
created
engine/Default/weapon_reorder.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,6 +11,7 @@
 block discarded – undo
11 11
 }
12 12
 
13 13
 if (isset($var['Form'])) {
14
-	if (isset($_REQUEST['weapon_reorder']) && is_array($_REQUEST['weapon_reorder']))
15
-		$ship->setWeaponLocations($_REQUEST['weapon_reorder']);
16
-}
14
+	if (isset($_REQUEST['weapon_reorder']) && is_array($_REQUEST['weapon_reorder'])) {
15
+			$ship->setWeaponLocations($_REQUEST['weapon_reorder']);
16
+	}
17
+	}
Please login to merge, or discard this patch.
engine/Default/council_embassy_processing.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 // Send vote announcement to members of the player's council (war votes)
40 40
 // or both races' councils (peace votes).
41 41
 $councilMembers = Council::getRaceCouncil($player->getGameID(),
42
-                                          $player->getRaceID());
42
+										  $player->getRaceID());
43 43
 if ($type == 'PEACE') {
44 44
 	$otherCouncil = Council::getRaceCouncil($player->getGameID(), $race_id);
45 45
 	$councilMembers = array_merge($councilMembers, $otherCouncil);
@@ -49,16 +49,16 @@  discard block
 block discarded – undo
49 49
 $color = ($type == 'PEACE' ? 'dgreen' : 'red');
50 50
 $type_fancy = "<span class=\"$color\">$type</span>";
51 51
 $message = $player->getLevelName() . " " . $player->getBBLink()
52
-           . " has initiated a vote for $type_fancy with the "
53
-           . Globals::getRaceName($race_id)
54
-           . "! You have " . format_time(TIME_FOR_COUNCIL_VOTE)
55
-           . " to cast your vote.";
52
+		   . " has initiated a vote for $type_fancy with the "
53
+		   . Globals::getRaceName($race_id)
54
+		   . "! You have " . format_time(TIME_FOR_COUNCIL_VOTE)
55
+		   . " to cast your vote.";
56 56
 
57 57
 foreach ($councilMembers as $accountID) {
58 58
 	// don't send to the player who started the vote
59 59
 	if ($player->getAccountID() != $accountID) {
60 60
 		SmrPlayer::sendMessageFromRace($player->getRaceID(), $player->getGameID(),
61
-		                               $accountID, $message, $time);
61
+									   $accountID, $message, $time);
62 62
   }
63 63
 }
64 64
 
Please login to merge, or discard this patch.
engine/Default/preferences_processing.php 1 patch
Braces   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -3,8 +3,7 @@  discard block
 block discarded – undo
3 3
 $container = create_container('skeleton.php');
4 4
 if (SmrSession::hasGame()) {
5 5
 	$container['body'] = 'current_sector.php';
6
-}
7
-else {
6
+} else {
8 7
 	$container['body'] = 'game_play.php';
9 8
 }
10 9
 $action = $_REQUEST['action'];
@@ -17,35 +16,38 @@  discard block
 block discarded – undo
17 16
 	// overwrite container
18 17
 	$container['body'] = 'validate.php';
19 18
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your email address, you will now need to revalidate with the code sent to the new email address.';
20
-}
21
-elseif ($action == 'Change Password') {
19
+} elseif ($action == 'Change Password') {
22 20
 	$new_password = $_REQUEST['new_password'];
23 21
 	$old_password = $_REQUEST['old_password'];
24 22
 	$retype_password = $_REQUEST['retype_password'];
25 23
 
26
-	if (empty($new_password))
27
-		create_error('You must enter a non empty password!');
24
+	if (empty($new_password)) {
25
+			create_error('You must enter a non empty password!');
26
+	}
28 27
 
29
-	if (!$account->checkPassword($old_password))
30
-		create_error('Your current password is wrong!');
28
+	if (!$account->checkPassword($old_password)) {
29
+			create_error('Your current password is wrong!');
30
+	}
31 31
 
32
-	if ($new_password != $retype_password)
33
-		create_error('The passwords you entered don\'t match!');
32
+	if ($new_password != $retype_password) {
33
+			create_error('The passwords you entered don\'t match!');
34
+	}
34 35
 
35
-	if ($new_password == $account->getLogin())
36
-		create_error('Your chosen password is invalid!');
36
+	if ($new_password == $account->getLogin()) {
37
+			create_error('Your chosen password is invalid!');
38
+	}
37 39
 
38 40
 	$account->setPassword($new_password);
39 41
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your password.';
40
-}
41
-elseif ($action == 'Change Name') {
42
+} elseif ($action == 'Change Name') {
42 43
 	$HoF_name = trim($_REQUEST['HoF_name']);
43 44
 
44 45
 	$limited_char = 0;
45 46
 	for ($i = 0; $i < strlen($HoF_name); $i++) {
46 47
 		// disallow certain ascii chars
47
-		if (ord($HoF_name[$i]) < 32 || ord($HoF_name[$i]) > 127)
48
-			create_error('Your Hall Of Fame name contains invalid characters!');
48
+		if (ord($HoF_name[$i]) < 32 || ord($HoF_name[$i]) > 127) {
49
+					create_error('Your Hall Of Fame name contains invalid characters!');
50
+		}
49 51
 
50 52
 		// numbers 48..57
51 53
 		// Letters 65..90
@@ -57,23 +59,26 @@  discard block
 block discarded – undo
57 59
 		}
58 60
 	}
59 61
 
60
-	if ($limited_char > 4)
61
-		create_error('You cannot use a name with more than 4 special characters.');
62
+	if ($limited_char > 4) {
63
+			create_error('You cannot use a name with more than 4 special characters.');
64
+	}
62 65
 
63 66
 
64 67
 	//disallow blank names
65
-	if (empty($HoF_name) || $HoF_name == '') create_error('You Hall of Fame name must contain characters!');
68
+	if (empty($HoF_name) || $HoF_name == '') {
69
+		create_error('You Hall of Fame name must contain characters!');
70
+	}
66 71
 
67 72
 	//no duplicates
68 73
 	$db->query('SELECT * FROM account WHERE hof_name = ' . $db->escapeString($HoF_name) . ' AND account_id != ' . $db->escapeNumber($account->getAccountID()) . ' LIMIT 1');
69
-	if ($db->nextRecord()) create_error('Someone is already using that name!');
74
+	if ($db->nextRecord()) {
75
+		create_error('Someone is already using that name!');
76
+	}
70 77
 
71 78
 	// set the HoF name in account stat
72 79
 	$account->setHofName($HoF_name);
73 80
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your hall of fame name.';
74
-}
75
-
76
-elseif ($action == 'Change Discord ID') {
81
+} elseif ($action == 'Change Discord ID') {
77 82
 	$discordId = trim($_REQUEST['discord_id']);
78 83
 
79 84
 	if (empty($discordId)) {
@@ -83,20 +88,21 @@  discard block
 block discarded – undo
83 88
 	} else {
84 89
 		// no duplicates
85 90
 		$db->query('SELECT * FROM account WHERE discord_id =' . $db->escapeString($discordId) . ' AND account_id != ' . $db->escapeNumber($account->getAccountID()) . ' LIMIT 1');
86
-		if ($db->nextRecord()) create_error('Someone is already using that Discord User ID!');
91
+		if ($db->nextRecord()) {
92
+			create_error('Someone is already using that Discord User ID!');
93
+		}
87 94
 
88 95
 		$account->setDiscordId($discordId);
89 96
 		$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your Discord User ID.';
90 97
 	}
91
-}
92
-
93
-elseif ($action == 'Change IRC Nick') {
98
+} elseif ($action == 'Change IRC Nick') {
94 99
 	$ircNick = trim($_REQUEST['irc_nick']);
95 100
 
96 101
 	for ($i = 0; $i < strlen($ircNick); $i++) {
97 102
 		// disallow certain ascii chars (and whitespace!)
98
-		if (ord($ircNick[$i]) < 33 || ord($ircNick[$i]) > 127)
99
-			create_error('Your IRC Nick contains invalid characters!');
103
+		if (ord($ircNick[$i]) < 33 || ord($ircNick[$i]) > 127) {
104
+					create_error('Your IRC Nick contains invalid characters!');
105
+		}
100 106
 	}
101 107
 
102 108
 	// here you can delete your registered irc nick
@@ -107,7 +113,9 @@  discard block
 block discarded – undo
107 113
 
108 114
 		// no duplicates
109 115
 		$db->query('SELECT * FROM account WHERE irc_nick = ' . $db->escapeString($ircNick) . ' AND account_id != ' . $db->escapeNumber($account->getAccountID()) . ' LIMIT 1');
110
-		if ($db->nextRecord()) create_error('Someone is already using that nick!');
116
+		if ($db->nextRecord()) {
117
+			create_error('Someone is already using that nick!');
118
+		}
111 119
 
112 120
 		// save irc nick in db and set message
113 121
 		$account->setIrcNick($ircNick);
@@ -115,8 +123,7 @@  discard block
 block discarded – undo
115 123
 
116 124
 	}
117 125
 
118
-}
119
-elseif ($action == 'Yes') {
126
+} elseif ($action == 'Yes') {
120 127
 	$account_id = $var['account_id'];
121 128
 	$amount = $var['amount'];
122 129
 
@@ -128,33 +135,28 @@  discard block
 block discarded – undo
128 135
 	// add to him
129 136
 	$his_account->increaseSmrCredits($amount);
130 137
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have sent SMR credits.';
131
-}
132
-elseif ($action == 'Change Timezone') {
138
+} elseif ($action == 'Change Timezone') {
133 139
 	$timez = $_REQUEST['timez'];
134
-	if (!is_numeric($timez))
135
-		create_error('Numbers only please');
140
+	if (!is_numeric($timez)) {
141
+			create_error('Numbers only please');
142
+	}
136 143
 
137 144
 	$db->query('UPDATE account SET offset = ' . $db->escapeNumber($timez) . ' WHERE account_id = ' . $db->escapeNumber($account->getAccountID()));
138 145
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your time offset.';
139
-}
140
-elseif ($action == 'Change Date Formats') {
146
+} elseif ($action == 'Change Date Formats') {
141 147
 	$account->setShortDateFormat($_REQUEST['dateformat']);
142 148
 	$account->setShortTimeFormat($_REQUEST['timeformat']);
143 149
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your date formats.';
144
-}
145
-elseif ($action == 'Change Images') {
150
+} elseif ($action == 'Change Images') {
146 151
 	$account->setDisplayShipImages($_REQUEST['images']);
147 152
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your ship images preferences.';
148
-}
149
-elseif ($action == 'Change Centering') {
153
+} elseif ($action == 'Change Centering') {
150 154
 	$account->setCenterGalaxyMapOnPlayer($_REQUEST['centergalmap'] == 'Yes');
151 155
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your centering galaxy map preferences.';
152
-}
153
-else if ($action == 'Change Size' && is_numeric($_REQUEST['fontsize']) && $_REQUEST['fontsize'] >= 50) {
156
+} else if ($action == 'Change Size' && is_numeric($_REQUEST['fontsize']) && $_REQUEST['fontsize'] >= 50) {
154 157
 	$account->setFontSize($_REQUEST['fontsize']);
155 158
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your font size.';
156
-}
157
-else if ($action == 'Change CSS Options') {
159
+} else if ($action == 'Change CSS Options') {
158 160
 	$account->setCssLink($_REQUEST['csslink']);
159 161
 	if ($_REQUEST['template'] == 'None') {
160 162
 		$account->setDefaultCSSEnabled(false);
@@ -165,24 +167,20 @@  discard block
 block discarded – undo
165 167
 		$account->setColourScheme($cssColourScheme);
166 168
 	}
167 169
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your CSS options.';
168
-}
169
-else if ($action == 'Change Kamikaze Setting') {
170
+} else if ($action == 'Change Kamikaze Setting') {
170 171
 	$player->setCombatDronesKamikazeOnMines($_REQUEST['kamikaze'] == 'Yes');
171 172
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your combat drones options.';
172
-}
173
-else if ($action == 'Change Message Setting') {
173
+} else if ($action == 'Change Message Setting') {
174 174
 	$player->setForceDropMessages($_REQUEST['forceDropMessages'] == 'Yes');
175 175
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your message options.';
176
-}
177
-else if ($action == 'Save Hotkeys') {
176
+} else if ($action == 'Save Hotkeys') {
178 177
 	foreach (AbstractSmrAccount::getDefaultHotkeys() as $hotkey => $binding) {
179 178
 		if (isset($_REQUEST[$hotkey])) {
180 179
 			$account->setHotkey($hotkey, explode(' ', $_REQUEST[$hotkey]));
181 180
 		}
182 181
 	}
183 182
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have saved your hotkeys.';
184
-}
185
-else if (strpos(trim($action), 'Alter Player') === 0) {
183
+} else if (strpos(trim($action), 'Alter Player') === 0) {
186 184
 	// trim input now
187 185
 	$player_name = trim($_POST['PlayerName']);
188 186
 
@@ -193,8 +191,9 @@  discard block
 block discarded – undo
193 191
 	$limited_char = 0;
194 192
 	for ($i = 0; $i < strlen($player_name); $i++) {
195 193
 		// disallow certain ascii chars
196
-		if (ord($player_name[$i]) < 32 || ord($player_name[$i]) > 127)
197
-			create_error('The player name contains invalid characters!');
194
+		if (ord($player_name[$i]) < 32 || ord($player_name[$i]) > 127) {
195
+					create_error('The player name contains invalid characters!');
196
+		}
198 197
 
199 198
 		// numbers 48..57
200 199
 		// Letters 65..90
@@ -206,11 +205,13 @@  discard block
 block discarded – undo
206 205
 		}
207 206
 	}
208 207
 
209
-	if ($limited_char > 4)
210
-		create_error('You cannot use a name with more than 4 special characters.');
208
+	if ($limited_char > 4) {
209
+			create_error('You cannot use a name with more than 4 special characters.');
210
+	}
211 211
 
212
-	if (empty($player_name))
213
-		create_error('You must enter a player name!');
212
+	if (empty($player_name)) {
213
+			create_error('You must enter a player name!');
214
+	}
214 215
 
215 216
 	// Escape html elements so the name displays correctly
216 217
 	$player_name = htmlentities($player_name);
@@ -237,8 +238,7 @@  discard block
 block discarded – undo
237 238
 	$news = 'Please be advised that ' . $old_name . ' has changed their name to ' . $player->getBBLink();
238 239
 	$db->query('INSERT INTO news (time, news_message, game_id, type) VALUES (' . $db->escapeNumber(TIME) . ',' . $db->escapeString($news) . ',' . $db->escapeNumber($player->getGameID()) . ', \'admin\')');
239 240
 	$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your player name.';
240
-}
241
-else if ($action == 'Update Colours') {
241
+} else if ($action == 'Update Colours') {
242 242
 	$friendlyColour = $_REQUEST['friendly_color'];
243 243
 	$neutralColour = $_REQUEST['neutral_color'];
244 244
 	$enemyColour = $_REQUEST['enemy_color'];
Please login to merge, or discard this patch.
engine/Default/planet_attack_processing.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,12 +49,12 @@
 block discarded – undo
49 49
 }
50 50
 
51 51
 foreach ($attackers as $attacker) {
52
-	$playerResults =& $attacker->shootPlanet($planet, false);
53
-	$results['Attackers']['Traders'][$attacker->getAccountID()] =& $playerResults;
52
+	$playerResults = & $attacker->shootPlanet($planet, false);
53
+	$results['Attackers']['Traders'][$attacker->getAccountID()] = & $playerResults;
54 54
 	$results['Attackers']['TotalDamage'] += $playerResults['TotalDamage'];
55 55
 }
56 56
 $results['Attackers']['Downgrades'] = $planet->checkForDowngrade($results['Attackers']['TotalDamage']);
57
-$results['Planet'] =& $planet->shootPlayers($attackers);
57
+$results['Planet'] = & $planet->shootPlayers($attackers);
58 58
 
59 59
 $account->log(LOG_TYPE_PLANET_BUSTING, 'Player attacks planet, the planet does ' . $results['Planet']['TotalDamage'] . ', their team does ' . $results['Attackers']['TotalDamage'] . ' and downgrades: ' . var_export($results['Attackers']['Downgrades'], true), $planet->getSectorID());
60 60
 
Please login to merge, or discard this patch.
Braces   +20 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,23 +1,31 @@  discard block
 block discarded – undo
1 1
 <?php declare(strict_types=1);
2 2
 
3
-if ($player->hasNewbieTurns())
3
+if ($player->hasNewbieTurns()) {
4 4
 	create_error('You are under newbie protection!');
5
-if ($player->hasFederalProtection())
5
+}
6
+if ($player->hasFederalProtection()) {
6 7
 	create_error('You are under federal protection!');
7
-if ($player->isLandedOnPlanet())
8
+}
9
+if ($player->isLandedOnPlanet()) {
8 10
 	create_error('You cannot attack planets whilst on a planet!');
9
-if ($player->getTurns() < 3)
11
+}
12
+if ($player->getTurns() < 3) {
10 13
 	create_error('You do not have enough turns to attack this planet!');
11
-if (!$ship->hasWeapons() && !$ship->hasCDs())
14
+}
15
+if (!$ship->hasWeapons() && !$ship->hasCDs()) {
12 16
 	create_error('What are you going to do? Insult it to death?');
13
-if (!$player->canFight())
17
+}
18
+if (!$player->canFight()) {
14 19
 	create_error('You are not allowed to fight!');
20
+}
15 21
 
16 22
 $planet = $player->getSectorPlanet();
17
-if (!$planet->exists())
23
+if (!$planet->exists()) {
18 24
 	create_error('This planet does not exist.');
19
-if (!$planet->isClaimed())
25
+}
26
+if (!$planet->isClaimed()) {
20 27
 	create_error('This planet is not claimed.');
28
+}
21 29
 
22 30
 $planetOwner = $planet->getOwner();
23 31
 
@@ -88,9 +96,10 @@  discard block
 block discarded – undo
88 96
 
89 97
 // Update sector messages for attackers
90 98
 foreach ($attackers as $attacker) {
91
-	if (!$player->equals($attacker))
92
-		$db->query('REPLACE INTO sector_message VALUES(' . $attacker->getAccountID() . ',' . $attacker->getGameID() . ',' . $db->escapeString('[ATTACK_RESULTS]' . $logId) . ')');
93
-}
99
+	if (!$player->equals($attacker)) {
100
+			$db->query('REPLACE INTO sector_message VALUES(' . $attacker->getAccountID() . ',' . $attacker->getGameID() . ',' . $db->escapeString('[ATTACK_RESULTS]' . $logId) . ')');
101
+	}
102
+	}
94 103
 
95 104
 $container = create_container('skeleton.php', 'planet_attack.php');
96 105
 $container['sector_id'] = $planet->getSectorID();
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/loader.php 1 patch
Braces   +16 added lines, -13 removed lines patch added patch discarded remove patch
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 		if (!USING_AJAX) {
69 69
 			require_once(get_file_loc('smr.inc'));
70 70
 			create_error('Your browser lost the SN. Try to reload the page!');
71
+		} else {
72
+					exit;
71 73
 		}
72
-		else
73
-			exit;
74 74
 	}
75 75
 	
76 76
 	// do we have such a container object in the db?
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
 		if (!USING_AJAX) {
79 79
 			require_once(get_file_loc('smr.inc'));
80 80
 			create_error('Please avoid using the back button!');
81
+		} else {
82
+					exit;
81 83
 		}
82
-		else
83
-			exit;
84 84
 	}
85 85
 	
86 86
 	// Determine where to load game scripts from (in case we need a special
@@ -88,9 +88,15 @@  discard block
 block discarded – undo
88 88
 	// Must not call `get_file_loc` until after we have set $overrideGameID
89 89
 	// (unless we're exiting immediately with an error, as above).
90 90
 	$overrideGameID = 0;
91
-	if (isset($var['game_id']) && is_numeric($var['game_id'])) $overrideGameID = $var['game_id'];
92
-	if ($overrideGameID == 0 && isset($var['GameID']) && is_numeric($var['GameID'])) $overrideGameID = $var['GameID'];
93
-	if ($overrideGameID == 0) $overrideGameID = SmrSession::getGameID();
91
+	if (isset($var['game_id']) && is_numeric($var['game_id'])) {
92
+		$overrideGameID = $var['game_id'];
93
+	}
94
+	if ($overrideGameID == 0 && isset($var['GameID']) && is_numeric($var['GameID'])) {
95
+		$overrideGameID = $var['GameID'];
96
+	}
97
+	if ($overrideGameID == 0) {
98
+		$overrideGameID = SmrSession::getGameID();
99
+	}
94 100
 
95 101
 	require_once(get_file_loc('smr.inc'));
96 102
 
@@ -106,22 +112,19 @@  discard block
 block discarded – undo
106 112
 			} else {
107 113
 				forward(create_container('skeleton.php', 'invalid_email.php'));
108 114
 			}
109
-		}
110
-		else if ($disabled['Reason'] == CLOSE_ACCOUNT_BY_REQUEST_REASON) {
115
+		} else if ($disabled['Reason'] == CLOSE_ACCOUNT_BY_REQUEST_REASON) {
111 116
 			if (isset($var['do_reopen_account'])) {
112 117
 				// The user has requested to reopen their account
113 118
 				$account->unbanAccount($account);
114 119
 			} else {
115 120
 				forward(create_container('skeleton.php', 'reopen_account.php'));
116 121
 			}
117
-		}
118
-		else {
122
+		} else {
119 123
 			forward(create_container('disabled.php'));
120 124
 		}
121 125
 	}
122 126
 	
123 127
 	do_voodoo();
124
-}
125
-catch (Throwable $e) {
128
+} catch (Throwable $e) {
126 129
 	handleException($e);
127 130
 }
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.