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

Failed Conditions
Pull Request — master (#1097)
by Dan
04:23
created
src/lib/Default/AbstractSmrShip.class.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -735,14 +735,14 @@
 block discarded – undo
735 735
 
736 736
 	public function isFederal() : bool {
737 737
 		return $this->getTypeID() === SHIP_TYPE_FEDERAL_DISCOVERY ||
738
-		       $this->getTypeID() === SHIP_TYPE_FEDERAL_WARRANT ||
739
-		       $this->getTypeID() === SHIP_TYPE_FEDERAL_ULTIMATUM;
738
+			   $this->getTypeID() === SHIP_TYPE_FEDERAL_WARRANT ||
739
+			   $this->getTypeID() === SHIP_TYPE_FEDERAL_ULTIMATUM;
740 740
 	}
741 741
 
742 742
 	public function isUnderground() : bool {
743 743
 		return $this->getTypeID() === SHIP_TYPE_THIEF ||
744
-		       $this->getTypeID() === SHIP_TYPE_ASSASSIN ||
745
-		       $this->getTypeID() === SHIP_TYPE_DEATH_CRUISER;
744
+			   $this->getTypeID() === SHIP_TYPE_ASSASSIN ||
745
+			   $this->getTypeID() === SHIP_TYPE_DEATH_CRUISER;
746 746
 	}
747 747
 
748 748
 	public function shootPlayers(array $targetPlayers) : array {
Please login to merge, or discard this patch.
src/tools/discord/commands/turns.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 function get_turns_message(SmrPlayer $player) : string {
4 4
 	// turns only update when the player is active, so calculate current turns
5 5
 	$turns = min($player->getTurns() + $player->getTurnsGained(time(), true),
6
-	             $player->getMaxTurns());
6
+				 $player->getMaxTurns());
7 7
 	$msg = $player->getPlayerName() . " has $turns/" . $player->getMaxTurns() . " turns.";
8 8
 
9 9
 	// Calculate time to max turns if under the max
Please login to merge, or discard this patch.
src/tools/npc/npc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
 			}
145 145
 
146 146
 			if ($tradeRoute === null) { //We only want to change trade route if there isn't already one set.
147
-				$TRADE_ROUTES =& findRoutes($player);
147
+				$TRADE_ROUTES = & findRoutes($player);
148 148
 				$tradeRoute = changeRoute($TRADE_ROUTES);
149 149
 			}
150 150
 
Please login to merge, or discard this patch.
src/engine/Default/history_games.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 $db = Smr\Database::getInstance();
18 18
 $db->switchDatabases($var['HistoryDatabase']);
19 19
 $dbResult = $db->read('SELECT start_date, type, end_date, game_name, speed, game_id ' .
20
-           'FROM game WHERE game_id = ' . $db->escapeNumber($game_id));
20
+		   'FROM game WHERE game_id = ' . $db->escapeNumber($game_id));
21 21
 $dbRecord = $dbResult->record();
22 22
 $template->assign('GameName', $game_name);
23 23
 $template->assign('Start', date($account->getDateFormat(), $dbRecord->getInt('start_date')));
Please login to merge, or discard this patch.
src/lib/Default/AbstractSmrPlayer.class.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 		foreach ($dbResult->records() as $dbRecord) {
322 322
 			try {
323 323
 				$otherPlayer = SmrPlayer::getPlayer($dbRecord->getInt('from_account_id'),
324
-				                                    $this->getGameID(), $forceUpdate);
324
+													$this->getGameID(), $forceUpdate);
325 325
 			} catch (PlayerNotFoundException $e) {
326 326
 				// Skip players that have not joined this game
327 327
 				continue;
@@ -879,9 +879,9 @@  discard block
 block discarded – undo
879 879
 	 */
880 880
 	public function canFight() : bool {
881 881
 		return !($this->hasNewbieTurns() ||
882
-		         $this->isDead() ||
883
-		         $this->isLandedOnPlanet() ||
884
-		         $this->hasFederalProtection());
882
+				 $this->isDead() ||
883
+				 $this->isLandedOnPlanet() ||
884
+				 $this->hasFederalProtection());
885 885
 	}
886 886
 
887 887
 	public function setDead(bool $bool) : void {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1692,7 +1692,7 @@  discard block
 block discarded – undo
1692 1692
 			create_error('The saved sector must be in the box!');
1693 1693
 		}
1694 1694
 
1695
-		$storedDestinations =& $this->getStoredDestinations();
1695
+		$storedDestinations = & $this->getStoredDestinations();
1696 1696
 		foreach ($storedDestinations as &$sd) {
1697 1697
 			if ($sd['SectorID'] == $sectorID) {
1698 1698
 				$sd['OffsetTop'] = $offsetTop;
@@ -2019,13 +2019,13 @@  discard block
 block discarded – undo
2019 2019
 			$dbResult = $this->db->read('SELECT type,amount FROM player_hof WHERE ' . $this->SQL);
2020 2020
 			$this->HOF = array();
2021 2021
 			foreach ($dbResult->records() as $dbRecord) {
2022
-				$hof =& $this->HOF;
2022
+				$hof = & $this->HOF;
2023 2023
 				$typeList = explode(':', $dbRecord->getString('type'));
2024 2024
 				foreach ($typeList as $type) {
2025 2025
 					if (!isset($hof[$type])) {
2026 2026
 						$hof[$type] = array();
2027 2027
 					}
2028
-					$hof =& $hof[$type];
2028
+					$hof = & $hof[$type];
2029 2029
 				}
2030 2030
 				$hof = $dbRecord->getFloat('amount');
2031 2031
 			}
@@ -2104,8 +2104,8 @@  discard block
 block discarded – undo
2104 2104
 		}
2105 2105
 		self::$HOFVis[$hofType] = $visibility;
2106 2106
 
2107
-		$hof =& $this->HOF;
2108
-		$hofChanged =& $this->hasHOFChanged;
2107
+		$hof = & $this->HOF;
2108
+		$hofChanged = & $this->hasHOFChanged;
2109 2109
 		$new = false;
2110 2110
 		foreach ($typeList as $type) {
2111 2111
 			if (!isset($hofChanged[$type])) {
@@ -2115,8 +2115,8 @@  discard block
 block discarded – undo
2115 2115
 				$hof[$type] = array();
2116 2116
 				$new = true;
2117 2117
 			}
2118
-			$hof =& $hof[$type];
2119
-			$hofChanged =& $hofChanged[$type];
2118
+			$hof = & $hof[$type];
2119
+			$hofChanged = & $hofChanged[$type];
2120 2120
 		}
2121 2121
 		if ($hofChanged == null) {
2122 2122
 			$hofChanged = self::HOF_CHANGED;
@@ -2784,7 +2784,7 @@  discard block
 block discarded – undo
2784 2784
 			'Starting Sector' => $this->getSectorID()
2785 2785
 		);
2786 2786
 
2787
-		$this->missions[$missionID] =& $mission;
2787
+		$this->missions[$missionID] = & $mission;
2788 2788
 		$this->setupMissionStep($missionID);
2789 2789
 		$this->rebuildMission($missionID);
2790 2790
 
@@ -2834,7 +2834,7 @@  discard block
 block discarded – undo
2834 2834
 
2835 2835
 	public function claimMissionReward(int $missionID) : string {
2836 2836
 		$this->getMissions();
2837
-		$mission =& $this->missions[$missionID];
2837
+		$mission = & $this->missions[$missionID];
2838 2838
 		if ($mission === false) {
2839 2839
 			throw new Exception('Unknown mission: ' . $missionID);
2840 2840
 		}
Please login to merge, or discard this patch.
src/lib/Default/bar.inc.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 	// Delete all tickets and re-insert the winning ticket
32 32
 	$db->write('DELETE FROM player_has_ticket WHERE game_id = ' . $db->escapeNumber($gameID));
33 33
 	$db->write('INSERT INTO player_has_ticket (game_id, account_id, time, prize) '
34
-	           .'VALUES (' . $db->escapeNumber($gameID) . ',' . $db->escapeNumber($winner_id) . ',\'0\',' . $db->escapeNumber($lottoInfo['Prize']) . ')');
34
+			   .'VALUES (' . $db->escapeNumber($gameID) . ',' . $db->escapeNumber($winner_id) . ',\'0\',' . $db->escapeNumber($lottoInfo['Prize']) . ')');
35 35
 
36 36
 	$db->unlock();
37 37
 
Please login to merge, or discard this patch.
src/lib/Default/help.inc.php 1 patch
Braces   +13 added lines, -9 removed lines patch added patch discarded remove patch
@@ -90,18 +90,22 @@
 block discarded – undo
90 90
 
91 91
 		echo ('<tr>');
92 92
 		echo ('<td colspan="5">');
93
-		if (isset($previous_topic_id) && $previous_topic_id > 0)
94
-			echo ('<b>Previous:</b> <a href="/manual.php?' . $previous_topic_id . '">' . get_numbering($previous_topic_id) . $previous_topic . '</a>&nbsp;&nbsp;&nbsp;');
95
-		if (isset($up_topic_id) && $up_topic_id > 0)
96
-			echo ('<b>Up:</b> <a href="/manual.php?' . $up_topic_id . '">' . get_numbering($up_topic_id) . $up_topic . '</a>&nbsp;&nbsp;&nbsp;');
97
-		if (isset($next_topic_id) && $next_topic_id > 0)
98
-			echo ('<b>Next:</b> <a href="/manual.php?' . $next_topic_id . '">' . get_numbering($next_topic_id) . $next_topic . '</a>');
93
+		if (isset($previous_topic_id) && $previous_topic_id > 0) {
94
+					echo ('<b>Previous:</b> <a href="/manual.php?' . $previous_topic_id . '">' . get_numbering($previous_topic_id) . $previous_topic . '</a>&nbsp;&nbsp;&nbsp;');
95
+		}
96
+		if (isset($up_topic_id) && $up_topic_id > 0) {
97
+					echo ('<b>Up:</b> <a href="/manual.php?' . $up_topic_id . '">' . get_numbering($up_topic_id) . $up_topic . '</a>&nbsp;&nbsp;&nbsp;');
98
+		}
99
+		if (isset($next_topic_id) && $next_topic_id > 0) {
100
+					echo ('<b>Next:</b> <a href="/manual.php?' . $next_topic_id . '">' . get_numbering($next_topic_id) . $next_topic . '</a>');
101
+		}
99 102
 		echo ('</tr>');
100 103
 
101 104
 		echo ('</table>');
102
-	} else
103
-		echo ('Invalid Topic!');
104
-}
105
+	} else {
106
+			echo ('Invalid Topic!');
107
+	}
108
+	}
105 109
 
106 110
 function echo_content($topic_id) {
107 111
 	// database object
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
@@ -30,13 +30,13 @@
 block discarded – undo
30 30
 const USER_SCORE_NAME = 'User Score';
31 31
 $hofTypes = array(DONATION_NAME=>true, USER_SCORE_NAME=>true);
32 32
 foreach ($dbResult->records() as $dbRecord) {
33
-	$hof =& $hofTypes;
33
+	$hof = & $hofTypes;
34 34
 	$typeList = explode(':', $dbRecord->getString('type'));
35 35
 	foreach ($typeList as $type) {
36 36
 		if (!isset($hof[$type])) {
37 37
 			$hof[$type] = array();
38 38
 		}
39
-		$hof =& $hof[$type];
39
+		$hof = & $hof[$type];
40 40
 	}
41 41
 	$hof = true;
42 42
 }
Please login to merge, or discard this patch.
src/lib/Default/AbstractSmrAccount.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -387,13 +387,13 @@
 block discarded – undo
387 387
 			$dbResult = $this->db->read('SELECT type,sum(amount) as amount FROM player_hof WHERE ' . $this->SQL . ' AND game_id IN (SELECT game_id FROM game WHERE ignore_stats = \'FALSE\') GROUP BY type');
388 388
 			$this->HOF = array();
389 389
 			foreach ($dbResult->records() as $dbRecord) {
390
-				$hof =& $this->HOF;
390
+				$hof = & $this->HOF;
391 391
 				$typeList = explode(':', $dbRecord->getString('type'));
392 392
 				foreach ($typeList as $type) {
393 393
 					if (!isset($hof[$type])) {
394 394
 						$hof[$type] = array();
395 395
 					}
396
-					$hof =& $hof[$type];
396
+					$hof = & $hof[$type];
397 397
 				}
398 398
 				$hof = $dbRecord->getFloat('amount');
399 399
 			}
Please login to merge, or discard this patch.