We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -2,8 +2,7 @@ |
||
2 | 2 | |
3 | 3 | // Get the dates ("|" sets hr/min/sec to 0) |
4 | 4 | $join = DateTime::createFromFormat('d/m/Y|', Request::get('game_join')); |
5 | -$start = empty(Request::get('game_start')) ? $join : |
|
6 | - DateTime::createFromFormat('d/m/Y|', Request::get('game_start')); |
|
5 | +$start = empty(Request::get('game_start')) ? $join : DateTime::createFromFormat('d/m/Y|', Request::get('game_start')); |
|
7 | 6 | $end = DateTime::createFromFormat('d/m/Y|', Request::get('game_end')); |
8 | 7 | |
9 | 8 | $game = SmrGame::getGame($var['game_id']); |
@@ -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 | ); |
@@ -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> |
@@ -10,7 +10,10 @@ |
||
10 | 10 | <td style="width: 80%" class="center"> |
11 | 11 | Local Map of the Known <span class="big bold"><?php echo $GalaxyName ?></span> Galaxy |
12 | 12 | <br /><br /> |
13 | - <?php if (isset($Error)) echo $Error; ?> |
|
13 | + <?php if (isset($Error)) { |
|
14 | + echo $Error; |
|
15 | +} |
|
16 | +?> |
|
14 | 17 | </td> |
15 | 18 | <td style="width: 10%"></td> |
16 | 19 | </tr> |
@@ -1,5 +1,8 @@ |
||
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; ?>" /> |
@@ -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> |
@@ -18,8 +18,7 @@ |
||
18 | 18 | if ($join === false) { |
19 | 19 | create_error('Join Date is not valid!'); |
20 | 20 | } |
21 | -$start = empty(Request::get('game_start')) ? $join : |
|
22 | - DateTime::createFromFormat('d/m/Y|', Request::get('game_start')); |
|
21 | +$start = empty(Request::get('game_start')) ? $join : DateTime::createFromFormat('d/m/Y|', Request::get('game_start')); |
|
23 | 22 | if ($start === false) { |
24 | 23 | create_error('Start Date is not valid!'); |
25 | 24 | } |
@@ -230,13 +230,13 @@ |
||
230 | 230 | $planet->increaseBuilding(PLANET_HANGAR, 4); |
231 | 231 | $this->assertTrue($planet->hasBuilding(PLANET_HANGAR)); |
232 | 232 | $this->assertSame(4, $planet->getBuilding(PLANET_HANGAR)); |
233 | - $this->assertSame(4/3, $planet->getLevel()); |
|
233 | + $this->assertSame(4 / 3, $planet->getLevel()); |
|
234 | 234 | |
235 | 235 | // Destroy some hangars |
236 | 236 | $planet->destroyBuilding(PLANET_HANGAR, 2); |
237 | 237 | $this->assertTrue($planet->hasBuilding(PLANET_HANGAR)); |
238 | 238 | $this->assertSame(2, $planet->getBuilding(PLANET_HANGAR)); |
239 | - $this->assertSame(2/3, $planet->getLevel()); |
|
239 | + $this->assertSame(2 / 3, $planet->getLevel()); |
|
240 | 240 | } |
241 | 241 | |
242 | 242 | } |
@@ -375,8 +375,9 @@ |
||
375 | 375 | |
376 | 376 | if (!$player->isDead() && $player->getNewbieTurns() <= NEWBIE_TURNS_WARNING_LIMIT && |
377 | 377 | $player->getNewbieWarning() && |
378 | - $var['url'] != 'newbie_warning_processing.php') |
|
379 | - Page::create('newbie_warning_processing.php')->go(); |
|
378 | + $var['url'] != 'newbie_warning_processing.php') { |
|
379 | + Page::create('newbie_warning_processing.php')->go(); |
|
380 | + } |
|
380 | 381 | } |
381 | 382 | |
382 | 383 | // Initialize the template |