We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | */ |
| 6 | 6 | class GameLink |
| 7 | 7 | { |
| 8 | - public bool $valid = false; // identifies if the message is linked to game data |
|
| 8 | + public bool $valid = false; // identifies if the message is linked to game data |
|
| 9 | 9 | public SmrPlayer $player; |
| 10 | 10 | |
| 11 | 11 | function __construct(Discord\Parts\Channel\Message $message) { |
@@ -735,14 +735,14 @@ |
||
| 735 | 735 | |
| 736 | 736 | public function isFederal() : bool { |
| 737 | 737 | return $this->getTypeID() === SHIP_TYPE_FEDERAL_DISCOVERY || |
| 738 | - $this->getTypeID() === SHIP_TYPE_FEDERAL_WARRANT || |
|
| 739 | - $this->getTypeID() === SHIP_TYPE_FEDERAL_ULTIMATUM; |
|
| 738 | + $this->getTypeID() === SHIP_TYPE_FEDERAL_WARRANT || |
|
| 739 | + $this->getTypeID() === SHIP_TYPE_FEDERAL_ULTIMATUM; |
|
| 740 | 740 | } |
| 741 | 741 | |
| 742 | 742 | public function isUnderground() : bool { |
| 743 | 743 | return $this->getTypeID() === SHIP_TYPE_THIEF || |
| 744 | - $this->getTypeID() === SHIP_TYPE_ASSASSIN || |
|
| 745 | - $this->getTypeID() === SHIP_TYPE_DEATH_CRUISER; |
|
| 744 | + $this->getTypeID() === SHIP_TYPE_ASSASSIN || |
|
| 745 | + $this->getTypeID() === SHIP_TYPE_DEATH_CRUISER; |
|
| 746 | 746 | } |
| 747 | 747 | |
| 748 | 748 | public function shootPlayers(array $targetPlayers) : array { |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | function get_turns_message(SmrPlayer $player) : string { |
| 4 | 4 | // turns only update when the player is active, so calculate current turns |
| 5 | 5 | $turns = min($player->getTurns() + $player->getTurnsGained(time(), true), |
| 6 | - $player->getMaxTurns()); |
|
| 6 | + $player->getMaxTurns()); |
|
| 7 | 7 | $msg = $player->getPlayerName() . " has $turns/" . $player->getMaxTurns() . " turns."; |
| 8 | 8 | |
| 9 | 9 | // Calculate time to max turns if under the max |
@@ -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'))); |
@@ -90,18 +90,22 @@ |
||
| 90 | 90 | |
| 91 | 91 | echo ('<tr>'); |
| 92 | 92 | echo ('<td colspan="5">'); |
| 93 | - if (isset($previous_topic_id) && $previous_topic_id > 0) |
|
| 94 | - echo ('<b>Previous:</b> <a href="/manual.php?' . $previous_topic_id . '">' . get_numbering($previous_topic_id) . $previous_topic . '</a> '); |
|
| 95 | - if (isset($up_topic_id) && $up_topic_id > 0) |
|
| 96 | - echo ('<b>Up:</b> <a href="/manual.php?' . $up_topic_id . '">' . get_numbering($up_topic_id) . $up_topic . '</a> '); |
|
| 97 | - if (isset($next_topic_id) && $next_topic_id > 0) |
|
| 98 | - echo ('<b>Next:</b> <a href="/manual.php?' . $next_topic_id . '">' . get_numbering($next_topic_id) . $next_topic . '</a>'); |
|
| 93 | + if (isset($previous_topic_id) && $previous_topic_id > 0) { |
|
| 94 | + echo ('<b>Previous:</b> <a href="/manual.php?' . $previous_topic_id . '">' . get_numbering($previous_topic_id) . $previous_topic . '</a> '); |
|
| 95 | + } |
|
| 96 | + if (isset($up_topic_id) && $up_topic_id > 0) { |
|
| 97 | + echo ('<b>Up:</b> <a href="/manual.php?' . $up_topic_id . '">' . get_numbering($up_topic_id) . $up_topic . '</a> '); |
|
| 98 | + } |
|
| 99 | + if (isset($next_topic_id) && $next_topic_id > 0) { |
|
| 100 | + echo ('<b>Next:</b> <a href="/manual.php?' . $next_topic_id . '">' . get_numbering($next_topic_id) . $next_topic . '</a>'); |
|
| 101 | + } |
|
| 99 | 102 | echo ('</tr>'); |
| 100 | 103 | |
| 101 | 104 | echo ('</table>'); |
| 102 | - } else |
|
| 103 | - echo ('Invalid Topic!'); |
|
| 104 | -} |
|
| 105 | + } else { |
|
| 106 | + echo ('Invalid Topic!'); |
|
| 107 | + } |
|
| 108 | + } |
|
| 105 | 109 | |
| 106 | 110 | function echo_content($topic_id) { |
| 107 | 111 | // database object |
@@ -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 | } |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | $ship = new AbstractSmrShip($this->player); |
| 102 | 102 | $this->expectException(\Exception::class); |
| 103 | 103 | $this->expectExceptionMessage('Ship does not have the supported hardware!'); |
| 104 | - $ship->setIllusion(SHIP_TYPE_THIEF, 12, 13);; |
|
| 104 | + $ship->setIllusion(SHIP_TYPE_THIEF, 12, 13); ; |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | public function test_hardware() : void { |