We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -96,7 +96,7 @@ |
||
96 | 96 | //heres the AIs cards |
97 | 97 | $i = 1; |
98 | 98 | if ($dealerHand->hasBlackjack() || |
99 | - ($playerHand->getValue() > 21 && $dealerHand->getValue() <= 21)) { |
|
99 | + ($playerHand->getValue() > 21 && $dealerHand->getValue() <= 21)) { |
|
100 | 100 | $message .= ('<h1 class="red center">Bank Wins</h1>'); |
101 | 101 | } |
102 | 102 | $message .= ('<div class="center">Bank\'s Cards are</div><br /><table class="center"><tr>'); |
@@ -44,8 +44,8 @@ |
||
44 | 44 | */ |
45 | 45 | public function getValue() : int { |
46 | 46 | if ($this->rank == self::RANK_JACK || |
47 | - $this->rank == self::RANK_QUEEN || |
|
48 | - $this->rank == self::RANK_KING) { |
|
47 | + $this->rank == self::RANK_QUEEN || |
|
48 | + $this->rank == self::RANK_KING) { |
|
49 | 49 | return 10; |
50 | 50 | } elseif ($this->isAce()) { |
51 | 51 | return 11; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | foreach (\Globals::getGoods() as $goodId => $value) { |
94 | 94 | if ($goods[$goodId] === true) { |
95 | 95 | if ($sectors[$currentSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_SELLS && |
96 | - $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_BUYS) { |
|
96 | + $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_BUYS) { |
|
97 | 97 | $rl[] = new OneWayRoute($currentSectorId, $targetSectorId, $raceID, $sectors[$targetSectorId]->getPort()->getRaceID(), $sectors[$currentSectorId]->getPort()->getGoodDistance($goodId), $sectors[$targetSectorId]->getPort()->getGoodDistance($goodId), $distance, $goodId); |
98 | 98 | } |
99 | 99 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | foreach (\Globals::getGoods() as $goodId => $value) { |
122 | 122 | if ($goods[$goodId] === true) { |
123 | 123 | if ($sectors[$currentSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_SELLS && |
124 | - $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_BUYS) { |
|
124 | + $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_BUYS) { |
|
125 | 125 | $owr = new OneWayRoute($currentSectorId, $targetSectorId, $sectors[$currentSectorId]->getPort()->getRaceID(), $sectors[$targetSectorId]->getPort()->getRaceID(), $sectors[$currentSectorId]->getPort()->getGoodDistance($goodId), $sectors[$targetSectorId]->getPort()->getGoodDistance($goodId), $distance, $goodId); |
126 | 126 | $fakeReturn = new OneWayRoute($targetSectorId, $currentSectorId, $sectors[$targetSectorId]->getPort()->getRaceID(), $sectors[$currentSectorId]->getPort()->getRaceID(), 0, 0, $distance, GOODS_NOTHING); |
127 | 127 | $mpr = new MultiplePortRoute($owr, $fakeReturn); |
@@ -3,10 +3,10 @@ |
||
3 | 3 | // Holds information linking the received message and the game data |
4 | 4 | class GameLink |
5 | 5 | { |
6 | - public $valid = false; // identifies if the message is linked to game data |
|
7 | - public $account; // SmrAccount instance |
|
8 | - public $alliance; // SmrAlliance instance |
|
9 | - public $player; // SmrPlayer instance |
|
6 | + public $valid = false; // identifies if the message is linked to game data |
|
7 | + public $account; // SmrAccount instance |
|
8 | + public $alliance; // SmrAlliance instance |
|
9 | + public $player; // SmrPlayer instance |
|
10 | 10 | |
11 | 11 | // $author can be either Discord\Parts\User\{User,Member} |
12 | 12 | function __construct(Discord\Parts\Channel\Channel $channel, $author) { |
@@ -33,7 +33,7 @@ |
||
33 | 33 | $query = "SELECT table_name FROM information_schema.tables WHERE table_rows > 0 AND TABLE_SCHEMA='smr_live'"; |
34 | 34 | $rs = self::$conn->query($query); |
35 | 35 | $all = $rs->fetch_all(); |
36 | - array_walk_recursive($all, function ($a) { |
|
36 | + array_walk_recursive($all, function($a) { |
|
37 | 37 | self::$defaultPopulatedTables[] = "'" . $a . "'"; |
38 | 38 | }); |
39 | 39 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | $db->switchDatabases($var['HistoryDatabase']); |
13 | 13 | $db->query('SELECT start_date, type, end_date, game_name, speed, game_id ' . |
14 | - 'FROM game WHERE game_id = ' . $db->escapeNumber($game_id)); |
|
14 | + 'FROM game WHERE game_id = ' . $db->escapeNumber($game_id)); |
|
15 | 15 | $db->requireRecord(); |
16 | 16 | $template->assign('GameName', $game_name); |
17 | 17 | $template->assign('Start', date(DATE_DATE_SHORT, $db->getInt('start_date'))); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $this->cargo_left = $this->getCargoHolds(); |
18 | 18 | } |
19 | 19 | protected function doFullUNO() { |
20 | - foreach($this->getMaxHardware() as $hardwareTypeID => $max) { |
|
20 | + foreach ($this->getMaxHardware() as $hardwareTypeID => $max) { |
|
21 | 21 | $this->hardware[$hardwareTypeID] = $max; |
22 | 22 | $this->oldHardware[$hardwareTypeID] = $max; |
23 | 23 | } |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | public function getIllusionShip() { |
50 | - if(!isset($this->illusionShip)) { |
|
51 | - $this->illusionShip=false; |
|
50 | + if (!isset($this->illusionShip)) { |
|
51 | + $this->illusionShip = false; |
|
52 | 52 | } |
53 | 53 | return $this->illusionShip; |
54 | 54 | } |
@@ -58,20 +58,20 @@ discard block |
||
58 | 58 | $db = MySqlDatabase::getInstance(); |
59 | 59 | $db->query('REPLACE INTO cached_dummys ' . |
60 | 60 | '(type, id, info) ' . |
61 | - 'VALUES (\'DummyShip\', '.$db->escapeString($this->getPlayer()->getPlayerName()).', '.$db->escapeString($cache).')'); |
|
61 | + 'VALUES (\'DummyShip\', ' . $db->escapeString($this->getPlayer()->getPlayerName()) . ', ' . $db->escapeString($cache) . ')'); |
|
62 | 62 | unserialize($cache); |
63 | 63 | } |
64 | 64 | |
65 | 65 | public static function getCachedDummyShip(AbstractSmrPlayer $player) { |
66 | - if(!isset(self::$CACHED_DUMMY_SHIPS[$player->getPlayerName()])) { |
|
66 | + if (!isset(self::$CACHED_DUMMY_SHIPS[$player->getPlayerName()])) { |
|
67 | 67 | $db = MySqlDatabase::getInstance(); |
68 | 68 | $db->query('SELECT info FROM cached_dummys |
69 | 69 | WHERE type = \'DummyShip\' |
70 | 70 | AND id = ' . $db->escapeString($player->getPlayerName()) . ' LIMIT 1'); |
71 | - if($db->nextRecord()) { |
|
71 | + if ($db->nextRecord()) { |
|
72 | 72 | $return = unserialize($db->getField('info')); |
73 | 73 | $return->regenerate($player); |
74 | - self::$CACHED_DUMMY_SHIPS[$player->getPlayerName()] =& $return; |
|
74 | + self::$CACHED_DUMMY_SHIPS[$player->getPlayerName()] = & $return; |
|
75 | 75 | } else { |
76 | 76 | self::$CACHED_DUMMY_SHIPS[$player->getPlayerName()] = new DummyShip($player); |
77 | 77 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $db->query('SELECT id FROM cached_dummys |
85 | 85 | WHERE type = \'DummyShip\''); |
86 | 86 | $dummyNames = array(); |
87 | - while($db->nextRecord()) { |
|
87 | + while ($db->nextRecord()) { |
|
88 | 88 | $dummyNames[] = $db->getField('id'); |
89 | 89 | } |
90 | 90 | return $dummyNames; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | |
95 | 95 | public function __sleep() { |
96 | - return array('gameID','weapons'); |
|
96 | + return array('gameID', 'weapons'); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | public function __wakeup() { |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | * The factories themselves are able to use dependency injection as well, so we can provide the MysqlProperties |
39 | 39 | * typehint to make sure the container constructs and instance and provides it to the factory. |
40 | 40 | */ |
41 | - mysqli::class => function (MySqlProperties $mysqlProperties): mysqli { |
|
41 | + mysqli::class => function(MySqlProperties $mysqlProperties): mysqli { |
|
42 | 42 | // Set the mysqli driver to raise exceptions on errors |
43 | - if (!mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT)) { |
|
43 | + if (!mysqli_report(MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT)) { |
|
44 | 44 | throw new RuntimeException('Failed to enable mysqli error reporting'); |
45 | 45 | } |
46 | 46 | return new mysqli( |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $mysqlProperties->getPassword(), |
50 | 50 | $mysqlProperties->getDatabaseName()); |
51 | 51 | }, |
52 | - Dotenv::class => function (): Dotenv { |
|
52 | + Dotenv::class => function(): Dotenv { |
|
53 | 53 | return Dotenv::createArrayBacked(ROOT); |
54 | 54 | }, |
55 | 55 | // Explicitly name all classes that are autowired, so we can take advantage of |