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 ( 64adfe...7d96ad )
by Dan
34s queued 16s
created
src/engine/Default/cargo_dump_processing.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
 	// Don't lose more exp than you have
48 48
 	$lost_xp = min($player->getExperience(),
49
-	               IRound(SmrPort::getBaseExperience($amount, $good_distance)));
49
+				   IRound(SmrPort::getBaseExperience($amount, $good_distance)));
50 50
 	$player->decreaseExperience($lost_xp);
51 51
 	$player->increaseHOF($lost_xp, array('Trade', 'Experience', 'Jettisoned'), HOF_PUBLIC);
52 52
 
Please login to merge, or discard this patch.
src/engine/Default/bar_gambling_processing.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
 	//heres the AIs cards
97 97
 	$i = 1;
98 98
 	if ($dealerHand->hasBlackjack() ||
99
-	    ($playerHand->getValue() > 21 && $dealerHand->getValue() <= 21)) {
99
+		($playerHand->getValue() > 21 && $dealerHand->getValue() <= 21)) {
100 100
 		$message .= ('<h1 class="red center">Bank Wins</h1>');
101 101
 	}
102 102
 	$message .= ('<div class="center">Bank\'s Cards are</div><br /><table class="center"><tr>');
Please login to merge, or discard this patch.
src/engine/Default/chat_sharing.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 	$shareFrom[$fromAccountId] = array(
20 20
 		'Player ID'   => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(),
21 21
 		'Player Name' => $otherPlayer == null ?
22
-		                 '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() :
23
-		                 $otherPlayer->getDisplayName(),
22
+						 '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() :
23
+						 $otherPlayer->getDisplayName(),
24 24
 		'All Games'   => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>',
25 25
 		'Game ID'     => $gameId,
26 26
 	);
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 	$shareTo[$toAccountId] = array(
41 41
 		'Player ID'   => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(),
42 42
 		'Player Name' => $otherPlayer == null ?
43
-		                 '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() :
44
-		                 $otherPlayer->getDisplayName(),
43
+						 '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() :
44
+						 $otherPlayer->getDisplayName(),
45 45
 		'All Games'   => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>',
46 46
 		'Game ID'     => $gameId,
47 47
 	);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
 	$shareFrom[$fromAccountId] = array(
20 20
 		'Player ID'   => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(),
21 21
 		'Player Name' => $otherPlayer == null ?
22
-		                 '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() :
23
-		                 $otherPlayer->getDisplayName(),
22
+		                 '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() : $otherPlayer->getDisplayName(),
24 23
 		'All Games'   => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>',
25 24
 		'Game ID'     => $gameId,
26 25
 	);
@@ -40,8 +39,7 @@  discard block
 block discarded – undo
40 39
 	$shareTo[$toAccountId] = array(
41 40
 		'Player ID'   => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(),
42 41
 		'Player Name' => $otherPlayer == null ?
43
-		                 '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() :
44
-		                 $otherPlayer->getDisplayName(),
42
+		                 '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() : $otherPlayer->getDisplayName(),
45 43
 		'All Games'   => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>',
46 44
 		'Game ID'     => $gameId,
47 45
 	);
Please login to merge, or discard this patch.
src/engine/Default/hall_of_fame_new.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@
 block discarded – undo
20 20
 const USER_SCORE_NAME = 'User Score';
21 21
 $hofTypes = array(DONATION_NAME=>true, USER_SCORE_NAME=>true);
22 22
 while ($db->nextRecord()) {
23
-	$hof =& $hofTypes;
23
+	$hof = & $hofTypes;
24 24
 	$typeList = explode(':', $db->getField('type'));
25 25
 	foreach ($typeList as $type) {
26 26
 		if (!isset($hof[$type])) {
27 27
 			$hof[$type] = array();
28 28
 		}
29
-		$hof =& $hof[$type];
29
+		$hof = & $hof[$type];
30 30
 	}
31 31
 	$hof = true;
32 32
 }
Please login to merge, or discard this patch.
src/engine/Default/rankings_alliance_vs_alliance.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 	foreach ($alliance_vs_ids as $id) {
53 53
 		$row_alliance = SmrAlliance::getAlliance($id, $player->getGameID());
54 54
 		$showRed = (!$curr_alliance->isNone() && $curr_alliance->hasDisbanded()) ||
55
-		           (!$row_alliance->isNone() && $row_alliance->hasDisbanded());
55
+				   (!$row_alliance->isNone() && $row_alliance->hasDisbanded());
56 56
 		$showBold = $curr_id == $player->getAllianceID() || $id == $player->getAllianceID();
57 57
 		$style = '';
58 58
 		if ($curr_id == $id && !$row_alliance->isNone()) {
Please login to merge, or discard this patch.
src/engine/Default/message_view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@
 block discarded – undo
202 202
 					AND receiver_delete = ' . $db->escapeBoolean(false) . '
203 203
 					ORDER BY send_time DESC');
204 204
 	while ($db->nextRecord()) {
205
-		$groupBox =& $messageBox['GroupedMessages'][$db->getInt('sender_id')];
205
+		$groupBox = & $messageBox['GroupedMessages'][$db->getInt('sender_id')];
206 206
 		// Limit the number of messages in each group
207 207
 		if (!isset($groupBox['Messages']) || count($groupBox['Messages']) < MESSAGE_SCOUT_GROUP_LIMIT) {
208 208
 			displayMessage($groupBox, $db->getInt('message_id'), $db->getInt('account_id'), $db->getInt('sender_id'), stripslashes($db->getField('message_text')), $db->getInt('send_time'), $db->getBoolean('msg_read'), MSG_SCOUT);
Please login to merge, or discard this patch.
src/engine/Default/combat_simulator.php 2 patches
Braces   +14 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,10 +9,11 @@  discard block
 block discarded – undo
9 9
 $realAttackers = array();
10 10
 $attackers = array();
11 11
 $i=1;
12
-if(isset($_POST['attackers']))
12
+if(isset($_POST['attackers'])) {
13 13
 	foreach($_POST['attackers'] as $attackerName) {
14 14
 		if($attackerName=='none')
15 15
 			continue;
16
+}
16 17
 		if(isset($usedNames[$attackerName])) {
17 18
 			$duplicates = true;
18 19
 			continue;
@@ -24,17 +25,19 @@  discard block
 block discarded – undo
24 25
 		++$i;
25 26
 	}
26 27
 
27
-for(;$i<=10;++$i)
28
+for(;$i<=10;++$i) {
28 29
 	$attackers[$i] = null;
30
+}
29 31
 $template->assign('Attackers',$attackers);
30 32
 
31 33
 $i=1;
32 34
 $realDefenders = array();
33 35
 $defenders = array();
34
-if(isset($_POST['defenders']))
36
+if(isset($_POST['defenders'])) {
35 37
 	foreach($_POST['defenders'] as $defenderName) {
36 38
 		if($defenderName=='none')
37 39
 			continue;
40
+}
38 41
 		if(isset($usedNames[$defenderName])) {
39 42
 			$duplicates = true;
40 43
 			continue;
@@ -46,8 +49,9 @@  discard block
 block discarded – undo
46 49
 		++$i;
47 50
 	}
48 51
 	
49
-for(;$i<=10;++$i)
52
+for(;$i<=10;++$i) {
50 53
 	$defenders[$i] = null;
54
+}
51 55
 $template->assign('Defenders',$defenders);
52 56
 
53 57
 $template->assign('Duplicates',$duplicates);
@@ -62,12 +66,14 @@  discard block
 block discarded – undo
62 66
 		while(count($realAttackers)>0 && count($realDefenders)>0) {
63 67
 			runAnAttack($realAttackers,$realDefenders);
64 68
 			foreach($realAttackers as $key => &$teamPlayer) {
65
-				if($teamPlayer->isDead())
66
-					unset($realAttackers[$key]);
69
+				if($teamPlayer->isDead()) {
70
+									unset($realAttackers[$key]);
71
+				}
67 72
 			} unset($teamPlayer);
68 73
 			foreach($realDefenders as $key => &$teamPlayer) {
69
-				if($teamPlayer->isDead())
70
-					unset($realDefenders[$key]);
74
+				if($teamPlayer->isDead()) {
75
+									unset($realDefenders[$key]);
76
+				}
71 77
 			} unset($teamPlayer);
72 78
 		}
73 79
 	}
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,79 +1,79 @@  discard block
 block discarded – undo
1 1
 <?php declare(strict_types=1);
2
-$template->assign('PageTopic','Combat Simulator');
2
+$template->assign('PageTopic', 'Combat Simulator');
3 3
 
4
-$template->assign('EditDummysLink', Page::create('skeleton.php','edit_dummys.php')->href());
4
+$template->assign('EditDummysLink', Page::create('skeleton.php', 'edit_dummys.php')->href());
5 5
 $template->assign('DummyNames', DummyPlayer::getDummyPlayerNames());
6 6
 
7 7
 $duplicates = false;
8 8
 $usedNames = array();
9 9
 $realAttackers = array();
10 10
 $attackers = array();
11
-$i=1;
12
-if(isset($_POST['attackers']))
13
-	foreach($_POST['attackers'] as $attackerName) {
14
-		if($attackerName=='none')
11
+$i = 1;
12
+if (isset($_POST['attackers']))
13
+	foreach ($_POST['attackers'] as $attackerName) {
14
+		if ($attackerName == 'none')
15 15
 			continue;
16
-		if(isset($usedNames[$attackerName])) {
16
+		if (isset($usedNames[$attackerName])) {
17 17
 			$duplicates = true;
18 18
 			continue;
19 19
 		}
20 20
 		$usedNames[$attackerName] = true;
21
-		$attackers[$i] =& DummyPlayer::getCachedDummyPlayer($attackerName);
21
+		$attackers[$i] = & DummyPlayer::getCachedDummyPlayer($attackerName);
22 22
 		$attackers[$i]->setAllianceID(1);
23
-		$realAttackers[$i] =& $attackers[$i];
23
+		$realAttackers[$i] = & $attackers[$i];
24 24
 		++$i;
25 25
 	}
26 26
 
27
-for(;$i<=10;++$i)
27
+for (;$i <= 10; ++$i)
28 28
 	$attackers[$i] = null;
29
-$template->assign('Attackers',$attackers);
29
+$template->assign('Attackers', $attackers);
30 30
 
31
-$i=1;
31
+$i = 1;
32 32
 $realDefenders = array();
33 33
 $defenders = array();
34
-if(isset($_POST['defenders']))
35
-	foreach($_POST['defenders'] as $defenderName) {
36
-		if($defenderName=='none')
34
+if (isset($_POST['defenders']))
35
+	foreach ($_POST['defenders'] as $defenderName) {
36
+		if ($defenderName == 'none')
37 37
 			continue;
38
-		if(isset($usedNames[$defenderName])) {
38
+		if (isset($usedNames[$defenderName])) {
39 39
 			$duplicates = true;
40 40
 			continue;
41 41
 		}
42 42
 		$usedNames[$attackerName] = true;
43
-		$defenders[$i] =& DummyPlayer::getCachedDummyPlayer($defenderName);
43
+		$defenders[$i] = & DummyPlayer::getCachedDummyPlayer($defenderName);
44 44
 		$defenders[$i]->setAllianceID(2);
45
-		$realDefenders[$i] =& $defenders[$i];
45
+		$realDefenders[$i] = & $defenders[$i];
46 46
 		++$i;
47 47
 	}
48 48
 
49
-for(;$i<=10;++$i)
49
+for (;$i <= 10; ++$i)
50 50
 	$defenders[$i] = null;
51
-$template->assign('Defenders',$defenders);
51
+$template->assign('Defenders', $defenders);
52 52
 
53
-$template->assign('Duplicates',$duplicates);
53
+$template->assign('Duplicates', $duplicates);
54 54
 
55
-$template->assign('CombatSimHREF', Page::create('skeleton.php','combat_simulator.php')->href());
55
+$template->assign('CombatSimHREF', Page::create('skeleton.php', 'combat_simulator.php')->href());
56 56
 
57 57
 if (!empty($realAttackers) && !empty($realDefenders)) {
58
-	if(isset($_REQUEST['run'])) {
59
-		runAnAttack($realAttackers,$realDefenders);
58
+	if (isset($_REQUEST['run'])) {
59
+		runAnAttack($realAttackers, $realDefenders);
60 60
 	}
61
-	if(isset($_REQUEST['death_run'])) {
62
-		while(count($realAttackers)>0 && count($realDefenders)>0) {
63
-			runAnAttack($realAttackers,$realDefenders);
64
-			foreach($realAttackers as $key => &$teamPlayer) {
65
-				if($teamPlayer->isDead())
61
+	if (isset($_REQUEST['death_run'])) {
62
+		while (count($realAttackers) > 0 && count($realDefenders) > 0) {
63
+			runAnAttack($realAttackers, $realDefenders);
64
+			foreach ($realAttackers as $key => &$teamPlayer) {
65
+				if ($teamPlayer->isDead())
66 66
 					unset($realAttackers[$key]);
67 67
 			} unset($teamPlayer);
68
-			foreach($realDefenders as $key => &$teamPlayer) {
69
-				if($teamPlayer->isDead())
68
+			foreach ($realDefenders as $key => &$teamPlayer) {
69
+				if ($teamPlayer->isDead())
70 70
 					unset($realDefenders[$key]);
71 71
 			} unset($teamPlayer);
72 72
 		}
73 73
 	}
74 74
 }
75 75
 
76
-function runAnAttack($realAttackers,$realDefenders) {
76
+function runAnAttack($realAttackers, $realDefenders) {
77 77
 	global $template;
78 78
 	$results = array('Attackers' => array('Traders' => array(), 'TotalDamage' => 0),
79 79
 					'Defenders' => array('Traders' => array(), 'TotalDamage' => 0));
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
 	}
85 85
 	foreach ($realDefenders as $accountID => $teamPlayer) {
86 86
 		$playerResults = $teamPlayer->shootPlayers($realAttackers);
87
-		$results['Defenders']['Traders'][]  = $playerResults;
87
+		$results['Defenders']['Traders'][] = $playerResults;
88 88
 		$results['Defenders']['TotalDamage'] += $playerResults['TotalDamage'];
89 89
 	}
90
-	$template->assign('TraderCombatResults',$results);
90
+	$template->assign('TraderCombatResults', $results);
91 91
 }
Please login to merge, or discard this patch.
src/engine/Default/shop_goods.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,9 +50,9 @@
 block discarded – undo
50 50
 			//get base for ports that dont happen to trade that good
51 51
 			$GOODS = Globals::getGoods();
52 52
 			$fine = $totalFine = $port->getLevel() *
53
-			    (($ship->getCargo(GOODS_SLAVES) * $GOODS[GOODS_SLAVES]['BasePrice']) +
54
-			     ($ship->getCargo(GOODS_WEAPONS) * $GOODS[GOODS_WEAPONS]['BasePrice']) +
55
-			     ($ship->getCargo(GOODS_NARCOTICS) * $GOODS[GOODS_NARCOTICS]['BasePrice']));
53
+				(($ship->getCargo(GOODS_SLAVES) * $GOODS[GOODS_SLAVES]['BasePrice']) +
54
+				 ($ship->getCargo(GOODS_WEAPONS) * $GOODS[GOODS_WEAPONS]['BasePrice']) +
55
+				 ($ship->getCargo(GOODS_NARCOTICS) * $GOODS[GOODS_NARCOTICS]['BasePrice']));
56 56
 			$player->increaseHOF($ship->getCargo(GOODS_SLAVES) + $ship->getCargo(GOODS_WEAPONS) + $ship->getCargo(GOODS_NARCOTICS), array('Trade', 'Search', 'Caught', 'Goods Confiscated'), HOF_PUBLIC);
57 57
 			$player->increaseHOF($totalFine, array('Trade', 'Search', 'Caught', 'Amount Fined'), HOF_PUBLIC);
58 58
 			$template->assign('TotalFine', $totalFine);
Please login to merge, or discard this patch.
src/templates/Default/admin/Default/ip_view_results.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
 	</center><?php
75 75
 
76 76
 } elseif (in_array($type, ['search', 'alliance_ips', 'wild_log', 'wild_in',
77
-                           'compare', 'compare_log', 'wild_ip', 'wild_host'])) { ?>
77
+						   'compare', 'compare_log', 'wild_ip', 'wild_host'])) { ?>
78 78
 
79 79
 	<center>
80 80
 		<?php echo $Summary; ?><br /><br />
Please login to merge, or discard this patch.