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 ( 2b5828...a7a342 )
by Dan
36s queued 18s
created
src/lib/Default/AbstractSmrPlayer.class.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 		while ($this->db->nextRecord()) {
315 315
 			try {
316 316
 				$otherPlayer = SmrPlayer::getPlayer($this->db->getInt('from_account_id'),
317
-				                                    $this->getGameID(), $forceUpdate);
317
+													$this->getGameID(), $forceUpdate);
318 318
 			} catch (PlayerNotFoundException $e) {
319 319
 				// Skip players that have not joined this game
320 320
 				continue;
@@ -878,9 +878,9 @@  discard block
 block discarded – undo
878 878
 	 */
879 879
 	public function canFight() {
880 880
 		return !($this->hasNewbieTurns() ||
881
-		         $this->isDead() ||
882
-		         $this->isLandedOnPlanet() ||
883
-		         $this->hasFederalProtection());
881
+				 $this->isDead() ||
882
+				 $this->isLandedOnPlanet() ||
883
+				 $this->hasFederalProtection());
884 884
 	}
885 885
 
886 886
 	public function setDead($bool) {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1711,7 +1711,7 @@  discard block
 block discarded – undo
1711 1711
 			create_error('The saved sector must be in the box!');
1712 1712
 		}
1713 1713
 
1714
-		$storedDestinations =& $this->getStoredDestinations();
1714
+		$storedDestinations = & $this->getStoredDestinations();
1715 1715
 		foreach ($storedDestinations as &$sd) {
1716 1716
 			if ($sd['SectorID'] == $sectorID) {
1717 1717
 				$sd['OffsetTop'] = $offsetTop;
@@ -2034,13 +2034,13 @@  discard block
 block discarded – undo
2034 2034
 			$this->db->query('SELECT type,amount FROM player_hof WHERE ' . $this->SQL);
2035 2035
 			$this->HOF = array();
2036 2036
 			while ($this->db->nextRecord()) {
2037
-				$hof =& $this->HOF;
2037
+				$hof = & $this->HOF;
2038 2038
 				$typeList = explode(':', $this->db->getField('type'));
2039 2039
 				foreach ($typeList as $type) {
2040 2040
 					if (!isset($hof[$type])) {
2041 2041
 						$hof[$type] = array();
2042 2042
 					}
2043
-					$hof =& $hof[$type];
2043
+					$hof = & $hof[$type];
2044 2044
 				}
2045 2045
 				$hof = $this->db->getFloat('amount');
2046 2046
 			}
@@ -2119,8 +2119,8 @@  discard block
 block discarded – undo
2119 2119
 		}
2120 2120
 		self::$HOFVis[$hofType] = $visibility;
2121 2121
 
2122
-		$hof =& $this->HOF;
2123
-		$hofChanged =& $this->hasHOFChanged;
2122
+		$hof = & $this->HOF;
2123
+		$hofChanged = & $this->hasHOFChanged;
2124 2124
 		$new = false;
2125 2125
 		foreach ($typeList as $type) {
2126 2126
 			if (!isset($hofChanged[$type])) {
@@ -2130,8 +2130,8 @@  discard block
 block discarded – undo
2130 2130
 				$hof[$type] = array();
2131 2131
 				$new = true;
2132 2132
 			}
2133
-			$hof =& $hof[$type];
2134
-			$hofChanged =& $hofChanged[$type];
2133
+			$hof = & $hof[$type];
2134
+			$hofChanged = & $hofChanged[$type];
2135 2135
 		}
2136 2136
 		if ($hofChanged == null) {
2137 2137
 			$hofChanged = self::HOF_CHANGED;
@@ -2780,7 +2780,7 @@  discard block
 block discarded – undo
2780 2780
 			'Starting Sector' => $this->getSectorID()
2781 2781
 		);
2782 2782
 
2783
-		$this->missions[$missionID] =& $mission;
2783
+		$this->missions[$missionID] = & $mission;
2784 2784
 		$this->setupMissionStep($missionID);
2785 2785
 		$this->rebuildMission($missionID);
2786 2786
 
@@ -2830,7 +2830,7 @@  discard block
 block discarded – undo
2830 2830
 
2831 2831
 	public function claimMissionReward($missionID) {
2832 2832
 		$this->getMissions();
2833
-		$mission =& $this->missions[$missionID];
2833
+		$mission = & $this->missions[$missionID];
2834 2834
 		if ($mission === false) {
2835 2835
 			throw new Exception('Unknown mission: ' . $missionID);
2836 2836
 		}
Please login to merge, or discard this patch.
src/lib/Default/Blackjack/Card.class.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@
 block discarded – undo
44 44
 	 */
45 45
 	public function getValue() : int {
46 46
 		if ($this->rank == self::RANK_JACK ||
47
-		    $this->rank == self::RANK_QUEEN ||
48
-		    $this->rank == self::RANK_KING) {
47
+			$this->rank == self::RANK_QUEEN ||
48
+			$this->rank == self::RANK_KING) {
49 49
 			return 10;
50 50
 		} elseif ($this->isAce()) {
51 51
 			return 11;
Please login to merge, or discard this patch.
src/lib/Default/SmrSector.class.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -549,7 +549,7 @@
 block discarded – undo
549 549
 	 */
550 550
 	public function setWarp(SmrSector $warp) {
551 551
 		if ($this->getWarp() == $warp->getSectorID() &&
552
-		    $warp->getWarp() == $this->getSectorID()) {
552
+			$warp->getWarp() == $this->getSectorID()) {
553 553
 			// Warps are already set correctly!
554 554
 			return;
555 555
 		}
Please login to merge, or discard this patch.
src/lib/Default/DummyPlayer.class.php 2 patches
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,9 @@  discard block
 block discarded – undo
53 53
 	}
54 54
 	
55 55
 	public function setAllianceID($ID) {
56
-		if($this->allianceID == $ID)
57
-			return;
56
+		if($this->allianceID == $ID) {
57
+					return;
58
+		}
58 59
 		$this->allianceID=$ID;
59 60
 	}
60 61
 	
@@ -93,8 +94,7 @@  discard block
 block discarded – undo
93 94
 		if($db->nextRecord()) {
94 95
 			$return = unserialize($db->getField('info'));
95 96
 			return $return;
96
-		}
97
-		else {
97
+		} else {
98 98
 			$return = new DummyPlayer();
99 99
 			return $return;
100 100
 		}
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,30 +1,30 @@  discard block
 block discarded – undo
1 1
 <?php declare(strict_types=1);
2 2
 
3 3
 class DummyPlayer extends AbstractSmrPlayer {
4
-	public function __construct($gameID=0,$playerName='Dummy',$raceID=1,$experience=1000,$alignment=100,$allianceID=0,$shipTypeID=60) {
4
+	public function __construct($gameID = 0, $playerName = 'Dummy', $raceID = 1, $experience = 1000, $alignment = 100, $allianceID = 0, $shipTypeID = 60) {
5 5
 		$this->accountID				= 0;
6
-		$this->gameID					= (int) $gameID;
7
-		$this->playerName				= (string) $playerName;
6
+		$this->gameID = (int)$gameID;
7
+		$this->playerName = (string)$playerName;
8 8
 		$this->playerID					= 0;
9 9
 		$this->sectorID					= 0;
10
-		$this->lastSectorID				= 0;
10
+		$this->lastSectorID = 0;
11 11
 		$this->turns					= 1000;
12
-		$this->newbieTurns				= 0;
12
+		$this->newbieTurns = 0;
13 13
 		$this->lastNewsUpdate			= 0;
14 14
 		$this->dead						= false;
15 15
 		$this->landedOnPlanet			= false;
16
-		$this->lastActive				= 0;
17
-		$this->lastCPLAction			= 0;
18
-		$this->raceID					= (int) $raceID;
19
-		$this->credits					= 0;
20
-		$this->experience				= (int) $experience;
21
-		$this->alignment				= (int) $alignment;
22
-		$this->militaryPayment			= 0;
23
-		$this->allianceID				= (int) $allianceID;
24
-		$this->shipID					= (int) $shipTypeID;
16
+		$this->lastActive = 0;
17
+		$this->lastCPLAction = 0;
18
+		$this->raceID = (int)$raceID;
19
+		$this->credits = 0;
20
+		$this->experience				= (int)$experience;
21
+		$this->alignment = (int)$alignment;
22
+		$this->militaryPayment = 0;
23
+		$this->allianceID				= (int)$allianceID;
24
+		$this->shipID					= (int)$shipTypeID;
25 25
 		$this->kills					= 0;
26 26
 		$this->deaths					= 0;
27
-		$this->lastPort					= 0;
27
+		$this->lastPort = 0;
28 28
 		$this->bank						= 0;
29 29
 		$this->zoom						= 0;
30 30
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	}
49 49
 
50 50
 	public function setAllianceID($ID) {
51
-		if($this->allianceID == $ID)
51
+		if ($this->allianceID == $ID)
52 52
 			return;
53
-		$this->allianceID=$ID;
53
+		$this->allianceID = $ID;
54 54
 	}
55 55
 
56 56
 	public function killPlayerByPlayer(AbstractSmrPlayer $killer) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		$db = MySqlDatabase::getInstance();
77 77
 		$db->query('REPLACE INTO cached_dummys ' .
78 78
 					'(type, id, info) ' .
79
-					'VALUES (\'DummyPlayer\', '.$db->escapeString($this->getPlayerName()).', '.$db->escapeString($cache).')');
79
+					'VALUES (\'DummyPlayer\', ' . $db->escapeString($this->getPlayerName()) . ', ' . $db->escapeString($cache) . ')');
80 80
 		 unserialize($cache);
81 81
 	}
82 82
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 		$db->query('SELECT info FROM cached_dummys
86 86
 					WHERE type = \'DummyPlayer\'
87 87
 						AND id = ' . $db->escapeString($name) . ' LIMIT 1');
88
-		if($db->nextRecord()) {
88
+		if ($db->nextRecord()) {
89 89
 			$return = unserialize($db->getField('info'));
90 90
 			return $return;
91 91
 		}
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		$db->query('SELECT id FROM cached_dummys
101 101
 					WHERE type = \'DummyPlayer\'');
102 102
 		$dummyNames = array();
103
-		while($db->nextRecord()) {
103
+		while ($db->nextRecord()) {
104 104
 			$dummyNames[] = $db->getField('id');
105 105
 		}
106 106
 		return $dummyNames;
Please login to merge, or discard this patch.
src/bootstrap.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 	if (!empty(BUG_REPORT_TO_ADDRESSES)) {
70 70
 		$mail = setupMailer();
71 71
 		$mail->Subject = (defined('PAGE_PREFIX') ? PAGE_PREFIX : '??? ') .
72
-		                 'Automatic Bug Report';
72
+						 'Automatic Bug Report';
73 73
 		$mail->setFrom('[email protected]');
74 74
 		$mail->Body = $message;
75 75
 		foreach (BUG_REPORT_TO_ADDRESSES as $toAddress) {
Please login to merge, or discard this patch.
src/tools/discord/GameLink.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,10 +3,10 @@
 block discarded – undo
3 3
 // Holds information linking the received message and the game data
4 4
 class GameLink
5 5
 {
6
-	public $valid = false;  // identifies if the message is linked to game data
7
-	public $account;        // SmrAccount instance
8
-	public $alliance;       // SmrAlliance instance
9
-	public $player;         // SmrPlayer instance
6
+	public $valid = false; // identifies if the message is linked to game data
7
+	public $account; // SmrAccount instance
8
+	public $alliance; // SmrAlliance instance
9
+	public $player; // SmrPlayer instance
10 10
 
11 11
 	// $author can be either Discord\Parts\User\{User,Member}
12 12
 	function __construct(Discord\Parts\Channel\Channel $channel, $author) {
Please login to merge, or discard this patch.
src/templates/Default/engine/Default/combat_log_viewer.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@
 block discarded – undo
20 20
 	$this->includeTemplate('includes/ForceFullCombatResults.inc.php', array('FullForceCombatResults'=>$CombatResults));
21 21
 } elseif ($CombatResultsType == 'PORT') {
22 22
 	$this->includeTemplate('includes/PortFullCombatResults.inc.php', array('FullPortCombatResults'=>$CombatResults,
23
-	                                                                  'MinimalDisplay'=>false,
24
-	                                                                  'AlreadyDestroyed'=>false));
23
+																	  'MinimalDisplay'=>false,
24
+																	  'AlreadyDestroyed'=>false));
25 25
 } elseif ($CombatResultsType == 'PLANET') {
26 26
 	$this->includeTemplate('includes/PlanetFullCombatResults.inc.php', array('FullPlanetCombatResults'=>$CombatResults,
27
-	                                                                    'MinimalDisplay'=>false,
28
-	                                                                    'AlreadyDestroyed'=>false));
27
+																		'MinimalDisplay'=>false,
28
+																		'AlreadyDestroyed'=>false));
29 29
 }
30 30
 ?>
Please login to merge, or discard this patch.
templates/Default/engine/Default/includes/TraderCombatKillMessage.inc.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 } else {
7 7
 	// Killed by port, planet, forces
8 8
 	echo 'The <span class="creds"> ' . number_format($KillResults['LostCredits'])
9
-	     . '</span> credits that were onboard ' . $TargetPlayer->getDisplayName()
10
-	     . "'s ship are lost in the wreckage.<br />";
9
+		 . '</span> credits that were onboard ' . $TargetPlayer->getDisplayName()
10
+		 . "'s ship are lost in the wreckage.<br />";
11 11
 }
12 12
 ?>
Please login to merge, or discard this patch.
src/templates/Default/engine/Default/includes/Head.inc.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@
 block discarded – undo
1 1
 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
2
-<title><?php echo PAGE_TITLE; ?><?php if (isset($GameName)) echo ": $GameName"; ?></title>
2
+<title><?php echo PAGE_TITLE; ?><?php if (isset($GameName)) {
3
+	echo ": $GameName";
4
+}
5
+?></title>
3 6
 <meta http-equiv="pragma" content="no-cache" /><?php
4 7
 if (!is_object($ThisAccount) || $ThisAccount->isDefaultCSSEnabled()) { ?>
5 8
 	<link rel="stylesheet" type="text/css" href="<?php echo $CSSLink; ?>" />
Please login to merge, or discard this patch.