We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -19,8 +19,8 @@ discard block |
||
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 |
||
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 | ); |
@@ -19,8 +19,7 @@ discard block |
||
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 |
||
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 | ); |
@@ -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 | $db = new SmrMySqlDatabase(); |
271 | 271 | $db->lockTable('player'); |
272 | 272 | |
@@ -1646,7 +1646,7 @@ discard block |
||
1646 | 1646 | create_error('The saved sector must be in the box!'); |
1647 | 1647 | } |
1648 | 1648 | |
1649 | - $storedDestinations =& $this->getStoredDestinations(); |
|
1649 | + $storedDestinations = & $this->getStoredDestinations(); |
|
1650 | 1650 | foreach ($storedDestinations as &$sd) { |
1651 | 1651 | if ($sd['SectorID'] == $sectorID) { |
1652 | 1652 | $sd['OffsetTop'] = $offsetTop; |
@@ -1973,13 +1973,13 @@ discard block |
||
1973 | 1973 | $this->db->query('SELECT type,amount FROM player_hof WHERE ' . $this->SQL); |
1974 | 1974 | $this->HOF = array(); |
1975 | 1975 | while ($this->db->nextRecord()) { |
1976 | - $hof =& $this->HOF; |
|
1976 | + $hof = & $this->HOF; |
|
1977 | 1977 | $typeList = explode(':', $this->db->getField('type')); |
1978 | 1978 | foreach ($typeList as $type) { |
1979 | 1979 | if (!isset($hof[$type])) { |
1980 | 1980 | $hof[$type] = array(); |
1981 | 1981 | } |
1982 | - $hof =& $hof[$type]; |
|
1982 | + $hof = & $hof[$type]; |
|
1983 | 1983 | } |
1984 | 1984 | $hof = $this->db->getFloat('amount'); |
1985 | 1985 | } |
@@ -2058,8 +2058,8 @@ discard block |
||
2058 | 2058 | } |
2059 | 2059 | self::$HOFVis[$hofType] = $visibility; |
2060 | 2060 | |
2061 | - $hof =& $this->HOF; |
|
2062 | - $hofChanged =& $this->hasHOFChanged; |
|
2061 | + $hof = & $this->HOF; |
|
2062 | + $hofChanged = & $this->hasHOFChanged; |
|
2063 | 2063 | $new = false; |
2064 | 2064 | foreach ($typeList as $type) { |
2065 | 2065 | if (!isset($hofChanged[$type])) { |
@@ -2069,8 +2069,8 @@ discard block |
||
2069 | 2069 | $hof[$type] = array(); |
2070 | 2070 | $new = true; |
2071 | 2071 | } |
2072 | - $hof =& $hof[$type]; |
|
2073 | - $hofChanged =& $hofChanged[$type]; |
|
2072 | + $hof = & $hof[$type]; |
|
2073 | + $hofChanged = & $hofChanged[$type]; |
|
2074 | 2074 | } |
2075 | 2075 | if ($hofChanged == null) { |
2076 | 2076 | $hofChanged = self::HOF_CHANGED; |
@@ -2681,7 +2681,7 @@ discard block |
||
2681 | 2681 | } |
2682 | 2682 | |
2683 | 2683 | private function setupMissionStep($missionID) { |
2684 | - $mission =& $this->missions[$missionID]; |
|
2684 | + $mission = & $this->missions[$missionID]; |
|
2685 | 2685 | if ($mission['On Step'] >= count(MISSIONS[$missionID]['Steps'])) { |
2686 | 2686 | // Nothing to do if this mission is already completed |
2687 | 2687 | return; |
@@ -2726,7 +2726,7 @@ discard block |
||
2726 | 2726 | 'Starting Sector' => $this->getSectorID() |
2727 | 2727 | ); |
2728 | 2728 | |
2729 | - $this->missions[$missionID] =& $mission; |
|
2729 | + $this->missions[$missionID] = & $mission; |
|
2730 | 2730 | $this->setupMissionStep($missionID); |
2731 | 2731 | $this->rebuildMission($missionID); |
2732 | 2732 | |
@@ -2783,7 +2783,7 @@ discard block |
||
2783 | 2783 | |
2784 | 2784 | public function claimMissionReward($missionID) { |
2785 | 2785 | $this->getMissions(); |
2786 | - $mission =& $this->missions[$missionID]; |
|
2786 | + $mission = & $this->missions[$missionID]; |
|
2787 | 2787 | if ($mission === false) { |
2788 | 2788 | throw new Exception('Unknown mission: ' . $missionID); |
2789 | 2789 | } |
@@ -76,8 +76,13 @@ discard block |
||
76 | 76 | <input type="number" name="amount" value="0" min="<?php echo MIN_GLOBAL_RELATIONS; ?>" max="<?php echo MAX_GLOBAL_RELATIONS; ?>" style="width:75px" /> |
77 | 77 | <select name="race"><?php |
78 | 78 | foreach (Globals::getRaces() as $race) { |
79 | - if ($race['Race ID'] == $ThisPlayer->getRaceID()) continue; |
|
80 | - if ($race['Race ID'] == RACE_NEUTRAL) continue; ?> |
|
79 | + if ($race['Race ID'] == $ThisPlayer->getRaceID()) { |
|
80 | + continue; |
|
81 | + } |
|
82 | + if ($race['Race ID'] == RACE_NEUTRAL) { |
|
83 | + continue; |
|
84 | + } |
|
85 | + ?> |
|
81 | 86 | <option value="<?php echo $race['Race ID']; ?>"><?php echo $race['Race Name']; ?></option><?php |
82 | 87 | } ?> |
83 | 88 | </select> |
@@ -88,8 +93,13 @@ discard block |
||
88 | 93 | <form method="POST" action="<?php echo $ChangeRaceHREF; ?>"> |
89 | 94 | <select name="race"><?php |
90 | 95 | foreach (Globals::getRaces() as $race) { |
91 | - if ($race['Race ID'] == $ThisPlayer->getRaceID()) continue; |
|
92 | - if ($race['Race ID'] == RACE_NEUTRAL) continue; ?> |
|
96 | + if ($race['Race ID'] == $ThisPlayer->getRaceID()) { |
|
97 | + continue; |
|
98 | + } |
|
99 | + if ($race['Race ID'] == RACE_NEUTRAL) { |
|
100 | + continue; |
|
101 | + } |
|
102 | + ?> |
|
93 | 103 | <option value="<?php echo $race['Race ID']; ?>"><?php echo $race['Race Name']; ?></option><?php |
94 | 104 | } ?> |
95 | 105 | </select> |
@@ -1,10 +1,10 @@ |
||
1 | -<?php if(isset($Preview)) { ?><table class="standard"><tr><td><?php echo bbifyMessage($Preview); ?></td></tr></table><?php } ?> |
|
1 | +<?php if (isset($Preview)) { ?><table class="standard"><tr><td><?php echo bbifyMessage($Preview); ?></td></tr></table><?php } ?> |
|
2 | 2 | <form name="MessageSendForm" method="POST" action="<?php echo $MessageSendFormHref; ?>"> |
3 | 3 | <p> |
4 | 4 | <b>From: </b><?php echo $ThisPlayer->getDisplayName(); ?><br /> |
5 | - <b>To: </b><?php if(isset($Receiver) && is_object($Receiver)) { echo $Receiver->getDisplayName(); } else { echo $Receiver; } ?> |
|
5 | + <b>To: </b><?php if (isset($Receiver) && is_object($Receiver)) { echo $Receiver->getDisplayName(); } else { echo $Receiver; } ?> |
|
6 | 6 | </p> |
7 | - <textarea spellcheck="true" name="message" required><?php if(isset($Preview)) { echo $Preview; } ?></textarea><br /> |
|
7 | + <textarea spellcheck="true" name="message" required><?php if (isset($Preview)) { echo $Preview; } ?></textarea><br /> |
|
8 | 8 | <br /> |
9 | 9 | <input type="submit" name="action" value="Send message" /> <input type="submit" name="action" value="Preview message" /> |
10 | 10 | </form> |
@@ -44,7 +44,10 @@ |
||
44 | 44 | <td> |
45 | 45 | <select name="game_type"><?php |
46 | 46 | foreach (SmrGame::GAME_TYPES as $GameTypeID => $GameType) { |
47 | - ?><option value="<?php echo $GameTypeID; ?>" <?php if ($GameType == $Game['gameType']) echo 'selected'; ?>><?php echo $GameType; ?></option><?php |
|
47 | + ?><option value="<?php echo $GameTypeID; ?>" <?php if ($GameType == $Game['gameType']) { |
|
48 | + echo 'selected'; |
|
49 | + } |
|
50 | + ?>><?php echo $GameType; ?></option><?php |
|
48 | 51 | } ?> |
49 | 52 | </select> |
50 | 53 | </td> |
@@ -337,8 +337,8 @@ |
||
337 | 337 | foreach (Globals::getAvailableTemplates() as $Template) { |
338 | 338 | foreach (Globals::getAvailableColourSchemes($Template) as $ColourScheme) { |
339 | 339 | $selected = ($ThisAccount->getTemplate() == $Template && |
340 | - $ThisAccount->getColourScheme() == $ColourScheme && |
|
341 | - $ThisAccount->isDefaultCSSEnabled()) ? 'selected' : ''; |
|
340 | + $ThisAccount->getColourScheme() == $ColourScheme && |
|
341 | + $ThisAccount->isDefaultCSSEnabled()) ? 'selected' : ''; |
|
342 | 342 | $name = $Template . ' - ' . $ColourScheme; |
343 | 343 | ?><option value="<?php echo $name; ?>" <?php echo $selected; ?>><?php echo $name; ?></option><?php |
344 | 344 | } |
@@ -150,7 +150,7 @@ |
||
150 | 150 | $account->increaseSmrRewardCredits(2 * CREDITS_PER_DOLLAR); // Give $2 worth of "reward" credits for joining. |
151 | 151 | if ($socialLogin) { |
152 | 152 | $account->addAuthMethod($_SESSION['socialLogin']->getLoginType(), |
153 | - $_SESSION['socialLogin']->getUserID()); |
|
153 | + $_SESSION['socialLogin']->getUserID()); |
|
154 | 154 | if ($validatedBySocial) { |
155 | 155 | $account->setValidated(true); |
156 | 156 | $account->update(); |
@@ -44,8 +44,8 @@ |
||
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; |
@@ -73,7 +73,7 @@ |
||
73 | 73 | return self::RANK_NAMES[$this->rank]; |
74 | 74 | } else { |
75 | 75 | // For normal pip (non-face) cards, name and rank are the same. |
76 | - return (string) $this->rank; |
|
76 | + return (string)$this->rank; |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | } |