We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -17,7 +17,7 @@ |
||
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'))); |
@@ -30,13 +30,13 @@ |
||
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 | } |
@@ -387,13 +387,13 @@ |
||
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 | } |
@@ -30,13 +30,13 @@ |
||
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 | } |
@@ -76,7 +76,10 @@ 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 (Smr\Race::getPlayableNames() as $raceID => $raceName) { |
79 | - if ($raceID == $ThisPlayer->getRaceID()) continue; ?> |
|
79 | + if ($raceID == $ThisPlayer->getRaceID()) { |
|
80 | + continue; |
|
81 | + } |
|
82 | + ?> |
|
80 | 83 | <option value="<?php echo $raceID; ?>"><?php echo $raceName; ?></option><?php |
81 | 84 | } ?> |
82 | 85 | </select> |
@@ -87,7 +90,10 @@ discard block |
||
87 | 90 | <form method="POST" action="<?php echo $ChangeRaceHREF; ?>"> |
88 | 91 | <select name="race"><?php |
89 | 92 | foreach (Smr\Race::getPlayableNames() as $raceID => $raceName) { |
90 | - if ($raceID == $ThisPlayer->getRaceID()) continue; ?> |
|
93 | + if ($raceID == $ThisPlayer->getRaceID()) { |
|
94 | + continue; |
|
95 | + } |
|
96 | + ?> |
|
91 | 97 | <option value="<?php echo $raceID; ?>"><?php echo $raceName; ?></option><?php |
92 | 98 | } ?> |
93 | 99 | </select> |
@@ -35,7 +35,7 @@ |
||
35 | 35 | } |
36 | 36 | $helper = self::getTwitterObj($_SESSION['TwitterToken']); |
37 | 37 | $accessToken = $helper->oauth('oauth/access_token', |
38 | - ['oauth_verifier' => Request::get('oauth_verifier')]); |
|
38 | + ['oauth_verifier' => Request::get('oauth_verifier')]); |
|
39 | 39 | $auth = self::getTwitterObj($accessToken); |
40 | 40 | $userInfo = $auth->get('account/verify_credentials', ['include_email' => 'true']); |
41 | 41 | if ($auth->getLastHttpCode() == 200) { |
@@ -128,7 +128,7 @@ |
||
128 | 128 | AND receiver_delete = ' . $db->escapeBoolean(false) . ' |
129 | 129 | ORDER BY send_time DESC'); |
130 | 130 | foreach ($dbResult->records() as $dbRecord) { |
131 | - $groupBox =& $messageBox['GroupedMessages'][$dbRecord->getInt('sender_id')]; |
|
131 | + $groupBox = & $messageBox['GroupedMessages'][$dbRecord->getInt('sender_id')]; |
|
132 | 132 | // Limit the number of messages in each group |
133 | 133 | if (!isset($groupBox['Messages']) || count($groupBox['Messages']) < MESSAGE_SCOUT_GROUP_LIMIT) { |
134 | 134 | $groupBox['Messages'][] = displayMessage($dbRecord->getInt('message_id'), $dbRecord->getInt('account_id'), $dbRecord->getInt('sender_id'), $player->getGameID(), $dbRecord->getString('message_text'), $dbRecord->getInt('send_time'), $dbRecord->getBoolean('msg_read'), MSG_SCOUT, $player->getAccount()); |
@@ -229,13 +229,13 @@ |
||
229 | 229 | $planet->increaseBuilding(PLANET_HANGAR, 4); |
230 | 230 | $this->assertTrue($planet->hasBuilding(PLANET_HANGAR)); |
231 | 231 | $this->assertSame(4, $planet->getBuilding(PLANET_HANGAR)); |
232 | - $this->assertSame(4/3, $planet->getLevel()); |
|
232 | + $this->assertSame(4 / 3, $planet->getLevel()); |
|
233 | 233 | |
234 | 234 | // Destroy some hangars |
235 | 235 | $planet->destroyBuilding(PLANET_HANGAR, 2); |
236 | 236 | $this->assertTrue($planet->hasBuilding(PLANET_HANGAR)); |
237 | 237 | $this->assertSame(2, $planet->getBuilding(PLANET_HANGAR)); |
238 | - $this->assertSame(2/3, $planet->getLevel()); |
|
238 | + $this->assertSame(2 / 3, $planet->getLevel()); |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | public function test_defenses() : void { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | // Send vote announcement to members of the player's council (war votes) |
45 | 45 | // or both races' councils (peace votes). |
46 | 46 | $councilMembers = Council::getRaceCouncil($player->getGameID(), |
47 | - $player->getRaceID()); |
|
47 | + $player->getRaceID()); |
|
48 | 48 | if ($type == 'PEACE') { |
49 | 49 | $otherCouncil = Council::getRaceCouncil($player->getGameID(), $race_id); |
50 | 50 | $councilMembers = array_merge($councilMembers, $otherCouncil); |
@@ -54,15 +54,15 @@ discard block |
||
54 | 54 | $color = ($type == 'PEACE' ? 'dgreen' : 'red'); |
55 | 55 | $type_fancy = "<span class=\"$color\">$type</span>"; |
56 | 56 | $message = $player->getLevelName() . " " . $player->getBBLink() |
57 | - . " has initiated a vote for $type_fancy with the [race=$race_id]!" |
|
58 | - . " You have " . format_time(TIME_FOR_COUNCIL_VOTE) |
|
59 | - . " to cast your vote."; |
|
57 | + . " has initiated a vote for $type_fancy with the [race=$race_id]!" |
|
58 | + . " You have " . format_time(TIME_FOR_COUNCIL_VOTE) |
|
59 | + . " to cast your vote."; |
|
60 | 60 | |
61 | 61 | foreach ($councilMembers as $accountID) { |
62 | 62 | // don't send to the player who started the vote |
63 | 63 | if ($player->getAccountID() != $accountID) { |
64 | 64 | SmrPlayer::sendMessageFromRace($player->getRaceID(), $player->getGameID(), |
65 | - $accountID, $message, $time); |
|
65 | + $accountID, $message, $time); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 |