We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | |
| 47 | 47 | function check_for_win(Smr\Blackjack\Hand $dealerHand, Smr\Blackjack\Hand $playerHand): string { |
| 48 | 48 | //does the player win |
| 49 | - return match (true) { |
|
| 49 | + return match(true) { |
|
| 50 | 50 | $playerHand->hasBusted() => 'no', |
| 51 | 51 | $playerHand->hasBlackjack() => 'bj', |
| 52 | 52 | $playerHand->getValue() == $dealerHand->getValue() => 'tie', |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | * Returns a SocialLogin class of the given derived type. |
| 24 | 24 | */ |
| 25 | 25 | public static function get(string $loginType): self { |
| 26 | - return match ($loginType) { |
|
| 26 | + return match($loginType) { |
|
| 27 | 27 | Facebook::getLoginType() => new Facebook(), |
| 28 | 28 | Twitter::getLoginType() => new Twitter(), |
| 29 | 29 | Google::getLoginType() => new Google(), |
@@ -67,9 +67,9 @@ |
||
| 67 | 67 | $session = Session::getInstance(); |
| 68 | 68 | $account = $session->getAccount(); |
| 69 | 69 | if (($vis == HOF_PRIVATE && $account->getAccountID() != $accountID) || |
| 70 | - ($vis == HOF_ALLIANCE && isset($gameID) && |
|
| 71 | - !SmrGame::getGame($gameID)->hasEnded() && |
|
| 72 | - !SmrPlayer::getPlayer($accountID, $gameID)->sameAlliance($session->getPlayer()))) { |
|
| 70 | + ($vis == HOF_ALLIANCE && isset($gameID) && |
|
| 71 | + !SmrGame::getGame($gameID)->hasEnded() && |
|
| 72 | + !SmrPlayer::getPlayer($accountID, $gameID)->sameAlliance($session->getPlayer()))) { |
|
| 73 | 73 | return '-'; |
| 74 | 74 | } |
| 75 | 75 | return $amount; |
@@ -149,7 +149,7 @@ |
||
| 149 | 149 | |
| 150 | 150 | public function getInterestRate(): float { |
| 151 | 151 | $level = $this->getLevel(); |
| 152 | - return match (true) { |
|
| 152 | + return match(true) { |
|
| 153 | 153 | $level < 9 => .0404, |
| 154 | 154 | $level < 19 => .0609, |
| 155 | 155 | $level < 29 => .1236, |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | if (!isset($this->goodDistances[$goodID])) { |
| 279 | 279 | $x = Globals::getGood($goodID); |
| 280 | 280 | // Calculate distance to the opposite of the offered transaction |
| 281 | - $x['TransactionType'] = match ($this->getGoodTransaction($goodID)) { |
|
| 281 | + $x['TransactionType'] = match($this->getGoodTransaction($goodID)) { |
|
| 282 | 282 | TRADER_BUYS => TRADER_SELLS, |
| 283 | 283 | TRADER_SELLS => TRADER_BUYS, |
| 284 | 284 | }; |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | if ($level === null) { |
| 427 | 427 | $level = $this->getLevel(); |
| 428 | 428 | } |
| 429 | - return match (true) { |
|
| 429 | + return match(true) { |
|
| 430 | 430 | $level <= 2 => 1, |
| 431 | 431 | $level <= 6 => 2, |
| 432 | 432 | $level >= 7 => 3, |
@@ -339,7 +339,7 @@ |
||
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | public function getRecruitType(): string { |
| 342 | - return match (true) { |
|
| 342 | + return match(true) { |
|
| 343 | 343 | !$this->isRecruiting() => self::RECRUIT_CLOSED, |
| 344 | 344 | empty($this->getPassword()) => self::RECRUIT_OPEN, |
| 345 | 345 | default => self::RECRUIT_PASSWORD, |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | function getPlayerOptionClass($player, $other) { |
| 3 | 3 | // Returns the CSS relational class of player "other" relative to "player". |
| 4 | - return match (true) { |
|
| 4 | + return match(true) { |
|
| 5 | 5 | $player->traderNAPAlliance($other) => 'friendly', |
| 6 | 6 | $other->canFight() => 'enemy', |
| 7 | 7 | default => 'neutral', |