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/rankings_alliance_kills.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-$template->assign('PageTopic','Alliance Kill Rankings');
2
+$template->assign('PageTopic', 'Alliance Kill Rankings');
3 3
 Menu::rankings(1, 2);
4 4
 
5 5
 $db->query('SELECT count(*) FROM alliance
@@ -13,9 +13,9 @@  discard block
 block discarded – undo
13 13
 				FROM alliance
14 14
 				WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . '
15 15
 				AND (
16
-					alliance_kills > '.$db->escapeNumber($player->getAlliance()->getKills()).'
16
+					alliance_kills > '.$db->escapeNumber($player->getAlliance()->getKills()) . '
17 17
 					OR (
18
-						alliance_kills = '.$db->escapeNumber($player->getAlliance()->getKills()).'
18
+						alliance_kills = '.$db->escapeNumber($player->getAlliance()->getKills()) . '
19 19
 						AND alliance_name <= ' . $db->escapeString($player->getAllianceName()) . '
20 20
 					)
21 21
 				)');
Please login to merge, or discard this patch.
engine/Default/feature_request.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 
43 43
 if ($canVote) {
44 44
 	$featureVotes = array();
45
-	$db->query('SELECT * FROM account_votes_for_feature WHERE account_id = '.$account->getAccountID());
46
-	while($db->nextRecord())
45
+	$db->query('SELECT * FROM account_votes_for_feature WHERE account_id = ' . $account->getAccountID());
46
+	while ($db->nextRecord())
47 47
 		$featureVotes[$db->getInt('feature_request_id')] = $db->getField('vote_type');
48 48
 }
49 49
 $db->query('SELECT * ' .
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
 			'JOIN feature_request_comments super USING(feature_request_id) ' .
52 52
 			'WHERE comment_id = 1 ' .
53 53
 			'AND status = ' . $db->escapeString($thisStatus) .
54
-			($var['category'] == 'New' ? ' AND EXISTS(SELECT posting_time FROM feature_request_comments WHERE feature_request_id = super.feature_request_id AND posting_time > ' . (TIME - NEW_REQUEST_DAYS*86400) .')':'') .
54
+			($var['category'] == 'New' ? ' AND EXISTS(SELECT posting_time FROM feature_request_comments WHERE feature_request_id = super.feature_request_id AND posting_time > ' . (TIME - NEW_REQUEST_DAYS * 86400) . ')' : '') .
55 55
 			' ORDER BY (SELECT MAX(posting_time) FROM feature_request_comments WHERE feature_request_id = super.feature_request_id) DESC');
56 56
 if ($db->getNumRows() > 0) {
57 57
 	$featureModerator = $account->hasPermission(PERMISSION_MODERATE_FEATURE_REQUEST);
58
-	$template->assign('FeatureModerator',$featureModerator);
59
-	$template->assign('FeatureRequestVoteFormHREF',SmrSession::getNewHREF(create_container('feature_request_vote_processing.php', '')));
58
+	$template->assign('FeatureModerator', $featureModerator);
59
+	$template->assign('FeatureRequestVoteFormHREF', SmrSession::getNewHREF(create_container('feature_request_vote_processing.php', '')));
60 60
 
61 61
 	$commentsContainer = $var;
62 62
 	$commentsContainer['body'] = 'feature_request_comments.php';
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
 		$featureRequests[$featureRequestID] = array(
68 68
 								'RequestID' => $featureRequestID,
69 69
 								'Message' => $db->getField('text'),
70
-								'Votes' => array('FAVOURITE'=>$db->getInt('fav'),'YES'=>$db->getInt('yes'),'NO'=>$db->getInt('no')),
70
+								'Votes' => array('FAVOURITE'=>$db->getInt('fav'), 'YES'=>$db->getInt('yes'), 'NO'=>$db->getInt('no')),
71 71
 								'VotedFor' => isset($featureVotes[$featureRequestID]) ? $featureVotes[$featureRequestID] : false
72 72
 		);
73
-		if($featureModerator)
73
+		if ($featureModerator)
74 74
 			$featureRequests[$featureRequestID]['RequestAccount'] = SmrAccount::getAccount($db->getInt('poster_id'));
75 75
 
76 76
 		if ($canVote) {
@@ -78,23 +78,23 @@  discard block
 block discarded – undo
78 78
 						FROM account_votes_for_feature
79 79
 						WHERE feature_request_id=' . $db2->escapeNumber($featureRequestID) . '
80 80
 						GROUP BY vote_type');
81
-			while($db2->nextRecord()) {
81
+			while ($db2->nextRecord()) {
82 82
 				$featureRequests[$featureRequestID]['Votes'][$db2->getField('vote_type')] = $db2->getInt('COUNT(*)');
83 83
 			}
84 84
 		}
85 85
 		$db2->query('SELECT COUNT(*)
86 86
 					FROM feature_request_comments
87 87
 					WHERE feature_request_id=' . $db2->escapeNumber($featureRequestID));
88
-		while($db2->nextRecord()) {
88
+		while ($db2->nextRecord()) {
89 89
 			$featureRequests[$featureRequestID]['Comments'] = $db2->getInt('COUNT(*)');
90 90
 		}
91 91
 		$commentsContainer['RequestID'] = $featureRequestID;
92 92
 		$featureRequests[$featureRequestID]['CommentsHREF'] = SmrSession::getNewHREF($commentsContainer);
93 93
 	}
94
-	$template->assign('FeatureRequests',$featureRequests);
94
+	$template->assign('FeatureRequests', $featureRequests);
95 95
 }
96 96
 
97
-$template->assign('FeatureRequestFormHREF',SmrSession::getNewHREF(create_container('feature_request_processing.php', '')));
97
+$template->assign('FeatureRequestFormHREF', SmrSession::getNewHREF(create_container('feature_request_processing.php', '')));
98 98
 
99 99
 function statusFromCategory($category) {
100 100
 	return ($category == 'New' || $category == 'All Open') ? 'Opened' : $category;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 		JOIN feature_request_comments super USING(feature_request_id)
109 109
 		WHERE comment_id = 1
110 110
 		AND status = ' . $db->escapeString($status) .
111
-		($daysNew ? ' AND EXISTS(SELECT posting_time FROM feature_request_comments WHERE feature_request_id = super.feature_request_id AND posting_time > ' . (TIME - $daysNew*86400) .')':'')
111
+		($daysNew ? ' AND EXISTS(SELECT posting_time FROM feature_request_comments WHERE feature_request_id = super.feature_request_id AND posting_time > ' . (TIME - $daysNew * 86400) . ')' : '')
112 112
 	);
113 113
 	$db->nextRecord();
114 114
 	return $db->getInt('count');
Please login to merge, or discard this patch.
engine/Default/bug_report.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','Report a Bug');
2
+$template->assign('PageTopic', 'Report a Bug');
Please login to merge, or discard this patch.
engine/Default/sector_jump_processing.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
 if ($sector->hasForces()) {
44 44
 	foreach ($sector->getForces() as $forces) {
45
-		if($forces->hasMines() && !$player->forceNAPAlliance($forces->getOwner())) {
45
+		if ($forces->hasMines() && !$player->forceNAPAlliance($forces->getOwner())) {
46 46
 			create_error('You cannot jump when there are hostile mines in the sector!');
47 47
 		}
48 48
 	}
@@ -60,30 +60,30 @@  discard block
 block discarded – undo
60 60
 	create_error('You don\'t have enough turns for that jump!');
61 61
 
62 62
 // send scout msg
63
-$sector->leavingSector($player,MOVEMENT_JUMP);
63
+$sector->leavingSector($player, MOVEMENT_JUMP);
64 64
 
65 65
 // Move the user around
66 66
 // TODO: (Must be done while holding both sector locks)
67
-$misjump = mt_rand(0,$maxMisjump);
67
+$misjump = mt_rand(0, $maxMisjump);
68 68
 if ($misjump > 0) { // we missed the sector
69 69
 	$distances = Plotter::findDistanceToX('Distance', $targetSector, false, null, null, $misjump);
70
-	while(count($distances[$misjump]) == 0) {
70
+	while (count($distances[$misjump]) == 0) {
71 71
 		$misjump--;
72 72
 	}
73 73
 		
74 74
 	$misjumpSector = array_rand($distances[$misjump]);
75
-	if($misjumpSector == null)
76
-		throw new Exception('Misjump sector is null, distances: ' . var_export ($distances, true));
75
+	if ($misjumpSector == null)
76
+		throw new Exception('Misjump sector is null, distances: ' . var_export($distances, true));
77 77
 	$player->setSectorID($misjumpSector);
78 78
 	unset($distances);
79 79
 }
80 80
 else { // we hit it. exactly
81 81
 	$player->setSectorID($targetSector->getSectorID());
82 82
 }
83
-$player->takeTurns($turnsToJump,$turnsToJump);
83
+$player->takeTurns($turnsToJump, $turnsToJump);
84 84
 
85 85
 // log action
86
-$account->log(LOG_TYPE_MOVEMENT, 'Jumps to sector: '.$target.' but hits: '.$player->getSectorID(), $sector->getSectorID());
86
+$account->log(LOG_TYPE_MOVEMENT, 'Jumps to sector: ' . $target . ' but hits: ' . $player->getSectorID(), $sector->getSectorID());
87 87
 
88 88
 $player->update();
89 89
 
@@ -94,22 +94,22 @@  discard block
 block discarded – undo
94 94
 acquire_lock($player->getSectorID());
95 95
 
96 96
 // get new sector object
97
-$sector =& $player->getSector();
97
+$sector = & $player->getSector();
98 98
 
99 99
 // make current sector visible to him
100 100
 $sector->markVisited($player);
101 101
 
102 102
 // send scout msg
103
-$sector->enteringSector($player,MOVEMENT_JUMP);
103
+$sector->enteringSector($player, MOVEMENT_JUMP);
104 104
 
105 105
 $mineOwnerID = false;
106 106
 foreach ($sector->getForces() as $forces) {
107
-	if(!$mineOwnerID && $forces->hasMines() && !$player->forceNAPAlliance($forces->getOwner())) {
107
+	if (!$mineOwnerID && $forces->hasMines() && !$player->forceNAPAlliance($forces->getOwner())) {
108 108
 		$mineOwnerID = $forces->getOwnerID();
109 109
 		break;
110 110
 	}
111 111
 }
112
-if($mineOwnerID) {
112
+if ($mineOwnerID) {
113 113
 	if ($player->hasNewbieTurns()) {
114 114
 		$container = create_container('skeleton.php', 'current_sector.php');
115 115
 		$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.';
Please login to merge, or discard this patch.
engine/Default/shop_hardware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$template->assign('PageTopic','Hardware Shop');
3
+$template->assign('PageTopic', 'Hardware Shop');
4 4
 
5
-if(!$player->getSector()->hasLocation($var['LocationID'])) {
5
+if (!$player->getSector()->hasLocation($var['LocationID'])) {
6 6
 	create_error('That location does not exist in this sector');
7 7
 }
8 8
 
Please login to merge, or discard this patch.
engine/Default/alliance_share_maps_processing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 			WHERE account_id = ' . $db->escapeNumber($player->getAccountID()) . '
45 45
 				AND game_id = ' . $db->escapeNumber($player->getGameID()));
46 46
 while ($db->nextRecord()) {
47
-	$cachedPort = SmrPort::getCachedPort($player->getGameID(),$db->getInt('sector_id'),$player->getAccountID());
47
+	$cachedPort = SmrPort::getCachedPort($player->getGameID(), $db->getInt('sector_id'), $player->getAccountID());
48 48
 	$cachedPort->addCachePorts($alliance_ids);
49 49
 }
50 50
 
Please login to merge, or discard this patch.
engine/Default/rankings_race_death.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
 
3
-$template->assign('PageTopic','Racial Standings');
3
+$template->assign('PageTopic', 'Racial Standings');
4 4
 
5 5
 Menu::rankings(2, 2);
6 6
 
Please login to merge, or discard this patch.
engine/Default/trader_bounties.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$template->assign('PageTopic','Bounties');
3
+$template->assign('PageTopic', 'Bounties');
4 4
 
5 5
 Menu::trader();
6 6
 
7 7
 foreach (array('HQ', 'UG') as $type) {
8 8
 	if ($player->hasCurrentBounty($type)) {
9 9
 		$bounty = $player->getCurrentBounty($type);
10
-		$msg = number_format($bounty['Amount']).' credits and '.number_format($bounty['SmrCredits']).' SMR credits';
10
+		$msg = number_format($bounty['Amount']) . ' credits and ' . number_format($bounty['SmrCredits']) . ' SMR credits';
11 11
 	} else {
12 12
 		$msg = 'None';
13 13
 	}
14
-	$template->assign('Bounty'.$type, $msg);
14
+	$template->assign('Bounty' . $type, $msg);
15 15
 }
16 16
 
17 17
 $template->assign('AllClaims', array($player->getClaimableBounties('HQ'),
Please login to merge, or discard this patch.
engine/Default/shop_gadget_processing.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@
 block discarded – undo
12 12
 foreach ($GADGETS as $gad_name => $gad_arr) $rev_gad[$gad_arr['ID']] = $gad_name;
13 13
 
14 14
 if ($THIS_PLAYER->getCredits() < $GADGETS[$rev_gad[$var['gad_id']]]['Cost'] && !has_privilege('Money Doesn\'t Matter')) {
15
-	$error .= get_status_message('red','Error','You do not have enough money!');
15
+	$error .= get_status_message('red', 'Error', 'You do not have enough money!');
16 16
 	return;
17 17
 }
18 18
 
19 19
 //take money and add gadget
20 20
 query('BEGIN;');
21
-if($THIS_PLAYER->addGadget($var['gad_id'])) {
21
+if ($THIS_PLAYER->addGadget($var['gad_id'])) {
22 22
 	$THIS_PLAYER->decreaseCredits($GADGETS[$rev_gad[$var['gad_id']]]['Cost']);
23
-	$error .= get_status_message('green','Success','We have obtained the gadget!');
23
+	$error .= get_status_message('green', 'Success', 'We have obtained the gadget!');
24 24
 }
25 25
 query('COMMIT;');
Please login to merge, or discard this patch.