We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -46,5 +46,5 @@ |
||
46 | 46 | $template->assign('ProcessingHREF', $processingHREF); |
47 | 47 | |
48 | 48 | $template->assign('PermissionCategories', |
49 | - AdminPermissions::getPermissionsByCategory()); |
|
49 | + AdminPermissions::getPermissionsByCategory()); |
|
50 | 50 | } |
@@ -4,7 +4,9 @@ |
||
4 | 4 | |
5 | 5 | $fn_seed = function($message) { |
6 | 6 | $link = new GameLink($message->channel, $message->author); |
7 | - if (!$link->valid) return; |
|
7 | + if (!$link->valid) { |
|
8 | + return; |
|
9 | + } |
|
8 | 10 | |
9 | 11 | $result = shared_channel_msg_seed($link->player); |
10 | 12 | $message->channel->sendMessage(join(EOL, $result)); |
@@ -6,7 +6,9 @@ discard block |
||
6 | 6 | |
7 | 7 | $fn_op = function($message) { |
8 | 8 | $link = new GameLink($message->channel, $message->author); |
9 | - if (!$link->valid) return; |
|
9 | + if (!$link->valid) { |
|
10 | + return; |
|
11 | + } |
|
10 | 12 | $player = $link->player; |
11 | 13 | |
12 | 14 | // print info about the next op |
@@ -16,7 +18,9 @@ discard block |
||
16 | 18 | |
17 | 19 | $fn_op_list = function($message) { |
18 | 20 | $link = new GameLink($message->channel, $message->author); |
19 | - if (!$link->valid) return; |
|
21 | + if (!$link->valid) { |
|
22 | + return; |
|
23 | + } |
|
20 | 24 | $player = $link->player; |
21 | 25 | |
22 | 26 | // print list of attendees |
@@ -26,7 +30,9 @@ discard block |
||
26 | 30 | |
27 | 31 | $fn_op_turns = function($message) { |
28 | 32 | $link = new GameLink($message->channel, $message->author); |
29 | - if (!$link->valid) return; |
|
33 | + if (!$link->valid) { |
|
34 | + return; |
|
35 | + } |
|
30 | 36 | $player = $link->player; |
31 | 37 | |
32 | 38 | // print list of attendees |
@@ -2,7 +2,9 @@ |
||
2 | 2 | |
3 | 3 | $fn_game = function($message) { |
4 | 4 | $link = new GameLink($message->channel, $message->author); |
5 | - if (!$link->valid) return; |
|
5 | + if (!$link->valid) { |
|
6 | + return; |
|
7 | + } |
|
6 | 8 | |
7 | 9 | $game = SmrGame::getGame($link->player->getGameID(), true); |
8 | 10 | $msg = "I am linked to game `" . $game->getDisplayName() . "` in this channel."; |
@@ -4,7 +4,9 @@ |
||
4 | 4 | |
5 | 5 | $fn_money = function($message) { |
6 | 6 | $link = new GameLink($message->channel, $message->author); |
7 | - if (!$link->valid) return; |
|
7 | + if (!$link->valid) { |
|
8 | + return; |
|
9 | + } |
|
8 | 10 | |
9 | 11 | $result = shared_channel_msg_money($link->player); |
10 | 12 | if ($result) { |
@@ -4,7 +4,9 @@ |
||
4 | 4 | |
5 | 5 | $fn_forces = function($message, $params) { |
6 | 6 | $link = new GameLink($message->channel, $message->author); |
7 | - if (!$link->valid) return; |
|
7 | + if (!$link->valid) { |
|
8 | + return; |
|
9 | + } |
|
8 | 10 | |
9 | 11 | // print the next expiring forces |
10 | 12 | $option = isset($params[0]) ? $params[0] : null; |
@@ -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 |