@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $this->playerAction->tell("{$fighter->getName()} uses {$action} and deals {$damage} damage."); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - private function askForAction(): Attack|Usable |
|
| 88 | + private function askForAction(): Attack | Usable |
|
| 89 | 89 | { |
| 90 | 90 | $action = $this->playerAction->askForChoice( |
| 91 | 91 | 'Select action', |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | private function calculateDamage(Attack $attack, Fighter $fighter): Damage |
| 128 | 128 | { |
| 129 | - return match (true) { |
|
| 129 | + return match(true) { |
|
| 130 | 130 | $attack instanceof MeleeAttack => |
| 131 | 131 | $attack->getDamage($fighter->getWeapon() ?? throw FightException::weaponRequired()) |
| 132 | 132 | ->increaseBy($fighter->getStrength()), |