@@ -17,7 +17,7 @@ |
||
| 17 | 17 | |
| 18 | 18 | public function askForConfirmation(string $question): bool; |
| 19 | 19 | |
| 20 | - public function tell(string|array $message): void; |
|
| 20 | + public function tell(string | array $message): void; |
|
| 21 | 21 | |
| 22 | 22 | public function list(array $items): void; |
| 23 | 23 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $this->playerAction->tell("{$fighter->getName()} uses {$action} and deals {$damage} damage."); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - private function askForAction(): Attack|Usable |
|
| 94 | + private function askForAction(): Attack | Usable |
|
| 95 | 95 | { |
| 96 | 96 | $action = $this->playerAction->askForChoice( |
| 97 | 97 | 'Select action', |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | private function calculateDamage(Attack $attack, Fighter $fighter): Damage |
| 123 | 123 | { |
| 124 | - return match (true) { |
|
| 124 | + return match(true) { |
|
| 125 | 125 | $attack instanceof MeleeAttack => |
| 126 | 126 | $attack->getDamage($fighter->getWeapon() ?? throw FightException::weaponRequired()) |
| 127 | 127 | ->increaseBy($fighter->getStrength()), |