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/login_check_processing.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,8 +3,7 @@  discard block
 block discarded – undo
3 3
 	// is account validated?
4 4
 	if (!$account->isValidated()) {
5 5
 		forward(create_container('skeleton.php', 'validate.php'));
6
-	}
7
-	else {
6
+	} else {
8 7
 		$var['CheckType'] = 'Announcements';
9 8
 	}
10 9
 }
@@ -17,8 +16,7 @@  discard block
 block discarded – undo
17 16
 	// do we have announcements?
18 17
 	if ($db->nextRecord()) {
19 18
 		forward(create_container('skeleton.php', 'announcements.php'));
20
-	}
21
-	else {
19
+	} else {
22 20
 		$var['CheckType'] = 'Updates';
23 21
 	}
24 22
 }
Please login to merge, or discard this patch.
engine/Default/alliance_list.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@
 block discarded – undo
29 29
 while ($db->nextRecord()) {
30 30
 	if ($db->getField('alliance_id') != $player->getAllianceID()) {
31 31
 		$container['body'] = 'alliance_roster.php';
32
-	}
33
-	else {
32
+	} else {
34 33
 		$container['body'] = 'alliance_mod.php';
35 34
 	}
36 35
 	$allianceID = $db->getInt('alliance_id');
Please login to merge, or discard this patch.
engine/Default/military_payment_claim.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,10 +3,11 @@
 block discarded – undo
3 3
 $template->assign('PageTopic','Military Payment Center');
4 4
 
5 5
 require_once(get_file_loc('menu_hq.inc'));
6
-if ($sector->hasHQ())
6
+if ($sector->hasHQ()) {
7 7
 	create_hq_menu();
8
-else
8
+} else {
9 9
 	create_ug_menu();
10
+}
10 11
 
11 12
 // We can only claim the payment once, so to prevent clobbering the message
12 13
 // upon AJAX refresh, we store it as a session variable when we first get it.
Please login to merge, or discard this patch.
engine/Default/shop_goods.php 1 patch
Braces   +17 added lines, -15 removed lines patch added patch discarded remove patch
@@ -7,8 +7,9 @@  discard block
 block discarded – undo
7 7
 $template->assign('Port', $port);
8 8
 
9 9
 $tradeable = checkPortTradeable($port,$player);
10
-if($tradeable!==true)
10
+if($tradeable!==true) {
11 11
 	create_error($tradeable);
12
+}
12 13
 
13 14
 // topic
14 15
 $template->assign('PageTopic','Port In Sector #'.$player->getSectorID());
@@ -23,17 +24,19 @@  discard block
 block discarded – undo
23 24
 //The player is sent here after trading and sees this if his offer is accepted.
24 25
 if (!empty($var['trade_msg'])) {
25 26
 	$template->assign('TradeMsg', $var['trade_msg']);
26
-}
27
-elseif ($player->getLastPort() != $player->getSectorID()) {
27
+} elseif ($player->getLastPort() != $player->getSectorID()) {
28 28
 	// test if we are searched, but only if we hadn't a previous trade here
29 29
 
30 30
 	$base_chance = 15;
31
-	if ($port->hasGood(GOODS_SLAVES))
32
-		$base_chance -= 4;
33
-	if ($port->hasGood(GOODS_WEAPONS))
34
-		$base_chance -= 4;
35
-	if ($port->hasGood(GOODS_NARCOTICS))
36
-		$base_chance -= 4;
31
+	if ($port->hasGood(GOODS_SLAVES)) {
32
+			$base_chance -= 4;
33
+	}
34
+	if ($port->hasGood(GOODS_WEAPONS)) {
35
+			$base_chance -= 4;
36
+	}
37
+	if ($port->hasGood(GOODS_NARCOTICS)) {
38
+			$base_chance -= 4;
39
+	}
37 40
 
38 41
 	if ($ship->isUnderground()) {
39 42
 		$base_chance -= 4;
@@ -62,11 +65,11 @@  discard block
 block discarded – undo
62 65
 					// because credits is 0 it will take money from bank
63 66
 					$player->decreaseBank(min($fine,$player->getBank()));
64 67
 					// leave insurance
65
-					if ($player->getBank() < 5000)
66
-						$player->setBank(5000);
68
+					if ($player->getBank() < 5000) {
69
+											$player->setBank(5000);
70
+					}
67 71
 				}
68
-			}
69
-			else {
72
+			} else {
70 73
 				$player->decreaseCredits($fine);
71 74
 			}
72 75
 
@@ -78,8 +81,7 @@  discard block
 block discarded – undo
78 81
 			$ship->setCargo(GOODS_NARCOTICS, 0);
79 82
 			$account->log(LOG_TYPE_TRADING, 'Player gets caught with illegals', $player->getSectorID());
80 83
 
81
-		}
82
-		else {
84
+		} else {
83 85
 			$template->assign('IllegalsFound', false);
84 86
 			$player->increaseHOF(1,array('Trade','Search','Times Found Innocent'), HOF_PUBLIC);
85 87
 			$player->increaseAlignment(1);
Please login to merge, or discard this patch.
engine/Default/message_blacklist.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@
 block discarded – undo
49 49
 	$PHP_OUTPUT.= '</table><br />';
50 50
 	$PHP_OUTPUT.= $form['submit'];
51 51
 	$PHP_OUTPUT.= '</form><br />';
52
-}
53
-else {
52
+} else {
54 53
 	$PHP_OUTPUT.= 'You are currently accepting all communications.<br />';
55 54
 }
56 55
 
Please login to merge, or discard this patch.
engine/Default/alliance_set_op_processing.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@
 block discarded – undo
15 15
 
16 16
 	// NOTE: for simplicity we don't touch `player_has_unread_messages` here,
17 17
 	// so they may get an errant alliance message icon if logged in.
18
-}
19
-else {
18
+} else {
20 19
 	// schedule an op
21 20
 	if (empty($_POST['date'])) {
22 21
 		error_on_page('You must specify a date for the operation!');
Please login to merge, or discard this patch.
engine/Default/trader_status.php 1 patch
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,12 +33,24 @@
 block discarded – undo
33 33
 $template->assign('HardwareHREF', SmrSession::getNewHREF($container));
34 34
 
35 35
 $hardware = [];
36
-if ($ship->canHaveScanner()) $hardware[] = 'Scanner';
37
-if ($ship->canHaveIllusion()) $hardware[] = 'Illusion Generator';
38
-if ($ship->canHaveCloak()) $hardware[] = 'Cloaking Device';
39
-if ($ship->canHaveJump()) $hardware[] = 'Jump Drive';
40
-if ($ship->canHaveDCS()) $hardware[] = 'Drone Scrambler';
41
-if (empty($hardware)) $hardware[] = 'none';
36
+if ($ship->canHaveScanner()) {
37
+	$hardware[] = 'Scanner';
38
+}
39
+if ($ship->canHaveIllusion()) {
40
+	$hardware[] = 'Illusion Generator';
41
+}
42
+if ($ship->canHaveCloak()) {
43
+	$hardware[] = 'Cloaking Device';
44
+}
45
+if ($ship->canHaveJump()) {
46
+	$hardware[] = 'Jump Drive';
47
+}
48
+if ($ship->canHaveDCS()) {
49
+	$hardware[] = 'Drone Scrambler';
50
+}
51
+if (empty($hardware)) {
52
+	$hardware[] = 'none';
53
+}
42 54
 $template->assign('Hardware', $hardware);
43 55
 
44 56
 $db->query('SELECT level_name,requirement FROM level WHERE requirement>' . $db->escapeNumber($player->getExperience()) . ' ORDER BY requirement ASC LIMIT 1');
Please login to merge, or discard this patch.
engine/Default/contact_processing.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@
 block discarded – undo
18 18
 $container['url'] = 'skeleton.php';
19 19
 if (SmrSession::hasGame()) {
20 20
 	$container['body'] = 'current_sector.php';
21
-}
22
-else {
21
+} else {
23 22
 	$container['body'] = 'game_play.php';
24 23
 }
25 24
 
Please login to merge, or discard this patch.
engine/Default/sector_move_processing.php 1 patch
Braces   +17 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,12 +1,14 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if ($var['target_sector'] == $player->getSectorID())
3
+if ($var['target_sector'] == $player->getSectorID()) {
4 4
 	forward(create_container('skeleton.php', $var['target_page']));
5
+}
5 6
 
6
-if($sector->getWarp() == $var['target_sector'])
7
+if($sector->getWarp() == $var['target_sector']) {
7 8
 	$turns = TURNS_PER_WARP;
8
-else
9
+} else {
9 10
 	$turns = TURNS_PER_SECTOR;
11
+}
10 12
 
11 13
 //allow hidden players (admins that don't play) to move without pinging, hitting mines, losing turns
12 14
 if (in_array($player->getAccountID(), Globals::getHiddenPlayers())) {
@@ -24,19 +26,23 @@  discard block
 block discarded – undo
24 26
 $action = '';
25 27
 if(isset($_REQUEST['action'])) {
26 28
 	$action = $_REQUEST['action'];
27
-	if ($action == 'No')
28
-		forward(create_container('skeleton.php', $var['target_page']));
29
-}
29
+	if ($action == 'No') {
30
+			forward(create_container('skeleton.php', $var['target_page']));
31
+	}
32
+	}
30 33
 
31 34
 // you can't move while on planet
32
-if ($player->isLandedOnPlanet())
35
+if ($player->isLandedOnPlanet()) {
33 36
 	create_error('You can\'t activate your engine while you are on a planet!');
37
+}
34 38
 
35
-if ($player->getTurns() < $turns)
39
+if ($player->getTurns() < $turns) {
36 40
 	create_error('You don\'t have enough turns to move!');
41
+}
37 42
 
38
-if (!$sector->isLinked($var['target_sector']))
43
+if (!$sector->isLinked($var['target_sector'])) {
39 44
 	create_error('You cannot move to that sector!');
45
+}
40 46
 
41 47
 // If you bump into mines in the sector you are trying to leave...
42 48
 if ($player->getLastSectorID() != $var['target_sector']) {
@@ -59,8 +65,7 @@  discard block
 block discarded – undo
59 65
 			$container = create_container('skeleton.php', 'current_sector.php');
60 66
 			$container['msg']= 'You have just flown past a sprinkle of mines.<br />Because of your newbie status you have been spared from the harsh reality of the forces.<br />It has cost you ' . $turns.' turn'.($turns==1?'':'s') . ' to navigate the minefield safely';
61 67
 			forward($container);
62
-		}
63
-		else {
68
+		} else {
64 69
 			$container = create_container('forces_attack_processing.php');
65 70
 			$container['action'] = 'bump';
66 71
 			$container['owner_id'] = $mine_owner_id;
@@ -121,8 +126,7 @@  discard block
 block discarded – undo
121 126
 		$container = create_container('skeleton.php', 'current_sector.php');
122 127
 		$container['msg']= 'You have just flown past a sprinkle of mines.<br />Because of your newbie status you have been spared from the harsh reality of the forces.<br />It has cost you ' . $turns.' turn'.($turns==1?'':'s') . ' to navigate the minefield safely.';
123 128
 		forward($container);
124
-	}
125
-	else {
129
+	} else {
126 130
 		$container = create_container('forces_attack_processing.php');
127 131
 		$container['action'] = 'bump';
128 132
 		$container['owner_id'] = $mine_owner_id;
Please login to merge, or discard this patch.