We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | // Send vote announcement to members of the player's council (war votes) |
| 40 | 40 | // or both races' councils (peace votes). |
| 41 | 41 | $councilMembers = Council::getRaceCouncil($player->getGameID(), |
| 42 | - $player->getRaceID()); |
|
| 42 | + $player->getRaceID()); |
|
| 43 | 43 | if ($type == 'PEACE') { |
| 44 | 44 | $otherCouncil = Council::getRaceCouncil($player->getGameID(), $race_id); |
| 45 | 45 | $councilMembers = array_merge($councilMembers, $otherCouncil); |
@@ -49,16 +49,16 @@ discard block |
||
| 49 | 49 | $color = ($type == 'PEACE' ? 'dgreen' : 'red'); |
| 50 | 50 | $type_fancy = "<span class=\"$color\">$type</span>"; |
| 51 | 51 | $message = $player->getLevelName() . " " . $player->getBBLink() |
| 52 | - . " has initiated a vote for $type_fancy with the " |
|
| 53 | - . Globals::getRaceName($race_id) |
|
| 54 | - . "! You have " . format_time(TIME_FOR_COUNCIL_VOTE) |
|
| 55 | - . " to cast your vote."; |
|
| 52 | + . " has initiated a vote for $type_fancy with the " |
|
| 53 | + . Globals::getRaceName($race_id) |
|
| 54 | + . "! You have " . format_time(TIME_FOR_COUNCIL_VOTE) |
|
| 55 | + . " to cast your vote."; |
|
| 56 | 56 | |
| 57 | 57 | foreach ($councilMembers as $accountID) { |
| 58 | 58 | // don't send to the player who started the vote |
| 59 | 59 | if ($player->getAccountID() != $accountID) { |
| 60 | 60 | SmrPlayer::sendMessageFromRace($player->getRaceID(), $player->getGameID(), |
| 61 | - $accountID, $message, $time); |
|
| 61 | + $accountID, $message, $time); |
|
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
@@ -49,12 +49,12 @@ |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | foreach ($attackers as $attacker) { |
| 52 | - $playerResults =& $attacker->shootPlanet($planet, false); |
|
| 53 | - $results['Attackers']['Traders'][$attacker->getAccountID()] =& $playerResults; |
|
| 52 | + $playerResults = & $attacker->shootPlanet($planet, false); |
|
| 53 | + $results['Attackers']['Traders'][$attacker->getAccountID()] = & $playerResults; |
|
| 54 | 54 | $results['Attackers']['TotalDamage'] += $playerResults['TotalDamage']; |
| 55 | 55 | } |
| 56 | 56 | $results['Attackers']['Downgrades'] = $planet->checkForDowngrade($results['Attackers']['TotalDamage']); |
| 57 | -$results['Planet'] =& $planet->shootPlayers($attackers); |
|
| 57 | +$results['Planet'] = & $planet->shootPlayers($attackers); |
|
| 58 | 58 | |
| 59 | 59 | $account->log(LOG_TYPE_PLANET_BUSTING, 'Player attacks planet, the planet does ' . $results['Planet']['TotalDamage'] . ', their team does ' . $results['Attackers']['TotalDamage'] . ' and downgrades: ' . var_export($results['Attackers']['Downgrades'], true), $planet->getSectorID()); |
| 60 | 60 | |
@@ -45,12 +45,12 @@ |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | foreach ($attackers as $attacker) { |
| 48 | - $playerResults =& $attacker->shootPort($port); |
|
| 49 | - $results['Attackers']['Traders'][$attacker->getAccountID()] =& $playerResults; |
|
| 48 | + $playerResults = & $attacker->shootPort($port); |
|
| 49 | + $results['Attackers']['Traders'][$attacker->getAccountID()] = & $playerResults; |
|
| 50 | 50 | $results['Attackers']['TotalDamage'] += $playerResults['TotalDamage']; |
| 51 | 51 | } |
| 52 | 52 | $results['Attackers']['Downgrades'] = $port->checkForDowngrade($results['Attackers']['TotalDamage']); |
| 53 | -$results['Port'] =& $port->shootPlayers($attackers); |
|
| 53 | +$results['Port'] = & $port->shootPlayers($attackers); |
|
| 54 | 54 | |
| 55 | 55 | $account->log(LOG_TYPE_PORT_RAIDING, 'Player attacks port, the port does ' . $results['Port']['TotalDamage'] . ', their team does ' . $results['Attackers']['TotalDamage'] . ' and downgrades ' . $results['Attackers']['Downgrades'] . ' levels.', $port->getSectorID()); |
| 56 | 56 | |
@@ -5,8 +5,9 @@ discard block |
||
| 5 | 5 | require_once(ENGINE . 'Default/help.inc'); |
| 6 | 6 | |
| 7 | 7 | $topic_id = $_SERVER['QUERY_STRING']; |
| 8 | - if (empty($topic_id) || !is_numeric($topic_id)) |
|
| 9 | - $topic_id = 1; |
|
| 8 | + if (empty($topic_id) || !is_numeric($topic_id)) { |
|
| 9 | + $topic_id = 1; |
|
| 10 | + } |
|
| 10 | 11 | ?> |
| 11 | 12 | <!DOCTYPE html> |
| 12 | 13 | |
@@ -48,8 +49,7 @@ discard block |
||
| 48 | 49 | |
| 49 | 50 | </body> |
| 50 | 51 | </html><?php |
| 51 | -} |
|
| 52 | -catch (Throwable $e) { |
|
| 52 | +} catch (Throwable $e) { |
|
| 53 | 53 | handleException($e); |
| 54 | 54 | } |
| 55 | 55 | ?> |
@@ -68,8 +68,7 @@ |
||
| 68 | 68 | |
| 69 | 69 | </body> |
| 70 | 70 | </html><?php |
| 71 | -} |
|
| 72 | -catch (Throwable $e) { |
|
| 71 | +} catch (Throwable $e) { |
|
| 73 | 72 | handleException($e); |
| 74 | 73 | } |
| 75 | 74 | ?> |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $account->increaseSmrRewardCredits(2 * CREDITS_PER_DOLLAR); // Give $2 worth of "reward" credits for joining. |
| 158 | 158 | if ($socialLogin) { |
| 159 | 159 | $account->addAuthMethod($_SESSION['socialLogin']->getLoginType(), |
| 160 | - $_SESSION['socialLogin']->getUserID()); |
|
| 160 | + $_SESSION['socialLogin']->getUserID()); |
|
| 161 | 161 | if ($validatedBySocial) { |
| 162 | 162 | $account->setValidated(true); |
| 163 | 163 | } |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | |
| 186 | 186 | // remember when we sent validation code |
| 187 | 187 | $db->query('INSERT INTO notification (notification_type, account_id, time) ' . |
| 188 | - 'VALUES(\'validation_code\', ' . $db->escapeNumber($account->getAccountID()) . ', ' . $db->escapeNumber(TIME) . ')'); |
|
| 188 | + 'VALUES(\'validation_code\', ' . $db->escapeNumber($account->getAccountID()) . ', ' . $db->escapeNumber(TIME) . ')'); |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | $container = create_container('login_processing.php'); |
@@ -41,8 +41,8 @@ |
||
| 41 | 41 | |
| 42 | 42 | function teamAttack(&$results, $fightingPlayers, $attack, $defend) { |
| 43 | 43 | foreach ($fightingPlayers[$attack] as $accountID => $teamPlayer) { |
| 44 | - $playerResults =& $teamPlayer->shootPlayers($fightingPlayers[$defend]); |
|
| 45 | - $results[$attack]['Traders'][$teamPlayer->getAccountID()] =& $playerResults; |
|
| 44 | + $playerResults = & $teamPlayer->shootPlayers($fightingPlayers[$defend]); |
|
| 45 | + $results[$attack]['Traders'][$teamPlayer->getAccountID()] = & $playerResults; |
|
| 46 | 46 | $results[$attack]['TotalDamage'] += $playerResults['TotalDamage']; |
| 47 | 47 | |
| 48 | 48 | // Award assists (if there are multiple attackers) |
@@ -72,18 +72,18 @@ |
||
| 72 | 72 | |
| 73 | 73 | // If mines are bumped, the forces shoot first. Otherwise player shoots first. |
| 74 | 74 | if ($bump) { |
| 75 | - $results['Forces'] =& $forces->shootPlayers($attackers, $bump); |
|
| 75 | + $results['Forces'] = & $forces->shootPlayers($attackers, $bump); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | $results['Attackers'] = array('TotalDamage' => 0); |
| 79 | 79 | foreach ($attackers as $attacker) { |
| 80 | - $playerResults =& $attacker->shootForces($forces); |
|
| 81 | - $results['Attackers']['Traders'][$attacker->getAccountID()] =& $playerResults; |
|
| 80 | + $playerResults = & $attacker->shootForces($forces); |
|
| 81 | + $results['Attackers']['Traders'][$attacker->getAccountID()] = & $playerResults; |
|
| 82 | 82 | $results['Attackers']['TotalDamage'] += $playerResults['TotalDamage']; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | if (!$bump) { |
| 86 | - $results['Forces'] =& $forces->shootPlayers($attackers, $bump); |
|
| 86 | + $results['Forces'] = & $forces->shootPlayers($attackers, $bump); |
|
| 87 | 87 | $forces->updateExpire(); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | // Delete all tickets and re-insert the winning ticket |
| 24 | 24 | $db->query('DELETE FROM player_has_ticket WHERE game_id = ' . $db->escapeNumber($gameID)); |
| 25 | 25 | $db->query('INSERT INTO player_has_ticket (game_id, account_id, time, prize) ' |
| 26 | - .'VALUES (' . $db->escapeNumber($gameID) . ',' . $db->escapeNumber($winner_id) . ',\'0\',' . $db->escapeNumber($lottoInfo['Prize']) . ')'); |
|
| 26 | + .'VALUES (' . $db->escapeNumber($gameID) . ',' . $db->escapeNumber($winner_id) . ',\'0\',' . $db->escapeNumber($lottoInfo['Prize']) . ')'); |
|
| 27 | 27 | |
| 28 | 28 | //get around locked table problem |
| 29 | 29 | $lottoWon = true; |