@@ -41,7 +41,7 @@ |
||
| 41 | 41 | $projectDir = dirname(__DIR__, 2); |
| 42 | 42 | $loader = new YamlFileLoader($this->container, new FileLocator("{$projectDir}/config")); |
| 43 | 43 | |
| 44 | - $loader->load(match ($this->environment) { |
|
| 44 | + $loader->load(match($this->environment) { |
|
| 45 | 45 | self::ENV_PROD => 'services.yaml', |
| 46 | 46 | self::ENV_TEST => 'services_test.yaml', |
| 47 | 47 | default => throw GameKernelException::unknownEnvironment($this->environment), |
@@ -17,8 +17,3 @@ |
||
| 17 | 17 | public function __toString(): string |
| 18 | 18 | { |
| 19 | 19 | return <<<'EOT' |
| 20 | - As you came closer to the fireplace you noticed a man in heavy armor, staring at the flames without any movement. |
|
| 21 | - A lot of empty bottles lays beneath his legs. |
|
| 22 | - EOT; |
|
| 23 | - } |
|
| 24 | -} |
|
@@ -17,8 +17,3 @@ |
||
| 17 | 17 | public function __toString(): string |
| 18 | 18 | { |
| 19 | 19 | return <<<'EOT' |
| 20 | - As you came closer to the fireplace you noticed a man in heavy armor, staring at the flames without any movement. |
|
| 21 | - A lot of empty bottles lays beneath his legs. |
|
| 22 | - EOT; |
|
| 23 | - } |
|
| 24 | -} |
|
@@ -17,8 +17,3 @@ |
||
| 17 | 17 | public function __toString(): string |
| 18 | 18 | { |
| 19 | 19 | return <<<'EOT' |
| 20 | - As you came closer to the fireplace you noticed a man in heavy armor, staring at the flames without any movement. |
|
| 21 | - A lot of empty bottles lays beneath his legs. |
|
| 22 | - EOT; |
|
| 23 | - } |
|
| 24 | -} |
|
@@ -17,8 +17,3 @@ |
||
| 17 | 17 | public function __toString(): string |
| 18 | 18 | { |
| 19 | 19 | return <<<'EOT' |
| 20 | - As you came closer to the fireplace you noticed a man in heavy armor, staring at the flames without any movement. |
|
| 21 | - A lot of empty bottles lays beneath his legs. |
|
| 22 | - EOT; |
|
| 23 | - } |
|
| 24 | -} |
|
@@ -17,8 +17,3 @@ |
||
| 17 | 17 | public function __toString(): string |
| 18 | 18 | { |
| 19 | 19 | return <<<'EOT' |
| 20 | - As you came closer to the fireplace you noticed a man in heavy armor, staring at the flames without any movement. |
|
| 21 | - A lot of empty bottles lays beneath his legs. |
|
| 22 | - EOT; |
|
| 23 | - } |
|
| 24 | -} |
|
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | ); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - private static function askForAction(Player $player, PlayerAction $playerAction): Attack|Usable |
|
| 84 | + private static function askForAction(Player $player, PlayerAction $playerAction): Attack | Usable |
|
| 85 | 85 | { |
| 86 | 86 | $action = $playerAction->askForChoice( |
| 87 | 87 | 'Select action', |
@@ -103,10 +103,10 @@ discard block |
||
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | private static function validateAction( |
| 106 | - Attack|Usable $action, |
|
| 106 | + Attack | Usable $action, |
|
| 107 | 107 | Player $player, |
| 108 | 108 | PlayerAction $playerAction, |
| 109 | - ): Attack|Usable { |
|
| 109 | + ): Attack | Usable { |
|
| 110 | 110 | if ($action instanceof MeleeAttack && $player->getWeapon() === null) { |
| 111 | 111 | $playerAction->note('This attack requires weapon equipped.'); |
| 112 | 112 | return self::askForAction($player, $playerAction); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | FighterCollection $opponents, |
| 127 | 127 | PlayerAction $playerAction, |
| 128 | 128 | ): Fighter { |
| 129 | - return match (true) { |
|
| 129 | + return match(true) { |
|
| 130 | 130 | $fighter instanceof Player && $opponents->count() > 1 |
| 131 | 131 | => $playerAction->askForChoice('Select opponent to attack', $opponents->getItems()), |
| 132 | 132 | $fighter instanceof Player => $opponents->first(), |