We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ -314,7 +314,7 @@ discard block | ||
| 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 | ||
| 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) { | 
| @@ -266,7 +266,7 @@ discard block | ||
| 266 | 266 | /** | 
| 267 | 267 | * Insert a new player into the database. Returns the new player object. | 
| 268 | 268 | */ | 
| 269 | -	public static function createPlayer($accountID, $gameID, $playerName, $raceID, $isNewbie, $npc=false) { | |
| 269 | +	public static function createPlayer($accountID, $gameID, $playerName, $raceID, $isNewbie, $npc = false) { | |
| 270 | 270 | // Put the player in a sector with an HQ | 
| 271 | 271 | $startSectorID = self::getHome($gameID, $raceID); | 
| 272 | 272 | |
| @@ -1647,7 +1647,7 @@ discard block | ||
| 1647 | 1647 |  			create_error('The saved sector must be in the box!'); | 
| 1648 | 1648 | } | 
| 1649 | 1649 | |
| 1650 | - $storedDestinations =& $this->getStoredDestinations(); | |
| 1650 | + $storedDestinations = & $this->getStoredDestinations(); | |
| 1651 | 1651 |  		foreach ($storedDestinations as &$sd) { | 
| 1652 | 1652 |  			if ($sd['SectorID'] == $sectorID) { | 
| 1653 | 1653 | $sd['OffsetTop'] = $offsetTop; | 
| @@ -1941,13 +1941,13 @@ discard block | ||
| 1941 | 1941 |  			$this->db->query('SELECT type,amount FROM player_hof WHERE ' . $this->SQL); | 
| 1942 | 1942 | $this->HOF = array(); | 
| 1943 | 1943 |  			while ($this->db->nextRecord()) { | 
| 1944 | - $hof =& $this->HOF; | |
| 1944 | + $hof = & $this->HOF; | |
| 1945 | 1945 |  				$typeList = explode(':', $this->db->getField('type')); | 
| 1946 | 1946 |  				foreach ($typeList as $type) { | 
| 1947 | 1947 |  					if (!isset($hof[$type])) { | 
| 1948 | 1948 | $hof[$type] = array(); | 
| 1949 | 1949 | } | 
| 1950 | - $hof =& $hof[$type]; | |
| 1950 | + $hof = & $hof[$type]; | |
| 1951 | 1951 | } | 
| 1952 | 1952 |  				$hof = $this->db->getFloat('amount'); | 
| 1953 | 1953 | } | 
| @@ -2026,8 +2026,8 @@ discard block | ||
| 2026 | 2026 | } | 
| 2027 | 2027 | self::$HOFVis[$hofType] = $visibility; | 
| 2028 | 2028 | |
| 2029 | - $hof =& $this->HOF; | |
| 2030 | - $hofChanged =& $this->hasHOFChanged; | |
| 2029 | + $hof = & $this->HOF; | |
| 2030 | + $hofChanged = & $this->hasHOFChanged; | |
| 2031 | 2031 | $new = false; | 
| 2032 | 2032 |  		foreach ($typeList as $type) { | 
| 2033 | 2033 |  			if (!isset($hofChanged[$type])) { | 
| @@ -2037,8 +2037,8 @@ discard block | ||
| 2037 | 2037 | $hof[$type] = array(); | 
| 2038 | 2038 | $new = true; | 
| 2039 | 2039 | } | 
| 2040 | - $hof =& $hof[$type]; | |
| 2041 | - $hofChanged =& $hofChanged[$type]; | |
| 2040 | + $hof = & $hof[$type]; | |
| 2041 | + $hofChanged = & $hofChanged[$type]; | |
| 2042 | 2042 | } | 
| 2043 | 2043 |  		if ($hofChanged == null) { | 
| 2044 | 2044 | $hofChanged = self::HOF_CHANGED; | 
| @@ -2649,7 +2649,7 @@ discard block | ||
| 2649 | 2649 | } | 
| 2650 | 2650 | |
| 2651 | 2651 |  	private function setupMissionStep($missionID) { | 
| 2652 | - $mission =& $this->missions[$missionID]; | |
| 2652 | + $mission = & $this->missions[$missionID]; | |
| 2653 | 2653 |  		if ($mission['On Step'] >= count(MISSIONS[$missionID]['Steps'])) { | 
| 2654 | 2654 | // Nothing to do if this mission is already completed | 
| 2655 | 2655 | return; | 
| @@ -2694,7 +2694,7 @@ discard block | ||
| 2694 | 2694 | 'Starting Sector' => $this->getSectorID() | 
| 2695 | 2695 | ); | 
| 2696 | 2696 | |
| 2697 | - $this->missions[$missionID] =& $mission; | |
| 2697 | + $this->missions[$missionID] = & $mission; | |
| 2698 | 2698 | $this->setupMissionStep($missionID); | 
| 2699 | 2699 | $this->rebuildMission($missionID); | 
| 2700 | 2700 | |
| @@ -2751,7 +2751,7 @@ discard block | ||
| 2751 | 2751 | |
| 2752 | 2752 |  	public function claimMissionReward($missionID) { | 
| 2753 | 2753 | $this->getMissions(); | 
| 2754 | - $mission =& $this->missions[$missionID]; | |
| 2754 | + $mission = & $this->missions[$missionID]; | |
| 2755 | 2755 |  		if ($mission === false) { | 
| 2756 | 2756 |  			throw new Exception('Unknown mission: ' . $missionID); | 
| 2757 | 2757 | } | 
| @@ -1,30 +1,30 @@ discard block | ||
| 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 | ||
| 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 | ||
| 76 | 76 | $db = new SmrMySqlDatabase(); | 
| 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 | ||
| 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 | ||
| 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; |