@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | Clash::invoke($fighter, $this->findOpponent($fighter), $action, $this->playerAction); |
78 | 78 | } |
79 | 79 | |
80 | - private function askForAction(): Attack|Usable |
|
80 | + private function askForAction(): Attack | Usable |
|
81 | 81 | { |
82 | 82 | $action = $this->playerAction->askForChoice( |
83 | 83 | 'Select action', |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | return $this->validateAction($action); |
99 | 99 | } |
100 | 100 | |
101 | - private function validateAction(Attack|Usable $action): Attack|Usable |
|
101 | + private function validateAction(Attack | Usable $action): Attack | Usable |
|
102 | 102 | { |
103 | 103 | if ($action instanceof MeleeAttack && $this->player->getWeapon() === null) { |
104 | 104 | $this->playerAction->note('This attack requires weapon equipped.'); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | Fighter $attacker, |
41 | 41 | Attack $attack, |
42 | 42 | ): Damage { |
43 | - return match (true) { |
|
43 | + return match(true) { |
|
44 | 44 | $attack instanceof MeleeAttack => |
45 | 45 | (new Damage(0)) |
46 | 46 | ->increaseBy($attack->getDamage($attacker->getWeapon() ?? throw FightException::weaponRequired())) |