| Total Complexity | 6 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 7 | final class BlockTheAttacker |
||
| 8 | { |
||
| 9 | /** @var int */ |
||
| 10 | private $defender; |
||
| 11 | /** @var int */ |
||
| 12 | private $attacker; |
||
| 13 | /** @var int */ |
||
| 14 | private $player; |
||
| 15 | /** @var MatchId */ |
||
| 16 | private $match; |
||
| 17 | |||
| 18 | public function __construct(int $defender, int $attacker, int $player, MatchId $match) |
||
| 19 | { |
||
| 20 | $this->defender = $defender; |
||
| 21 | $this->attacker = $attacker; |
||
| 22 | $this->player = $player; |
||
| 23 | $this->match = $match; |
||
| 24 | } |
||
| 25 | |||
| 26 | public static function number( |
||
| 27 | int $attacker, |
||
| 28 | int $defender, |
||
| 29 | int $player, |
||
| 30 | MatchId $match |
||
| 31 | ): self { |
||
| 32 | return new self($defender, $attacker, $player, $match); |
||
| 33 | } |
||
| 34 | |||
| 35 | public function defender(): int |
||
| 38 | } |
||
| 39 | |||
| 40 | public function attacker(): int |
||
| 43 | } |
||
| 44 | |||
| 45 | public function player(): int |
||
| 48 | } |
||
| 49 | |||
| 50 | public function match(): MatchId |
||
| 55 |