| Total Complexity | 7 |
| Total Lines | 61 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 9 | final class BlockTheAttacker implements Command |
||
| 10 | { |
||
| 11 | /** @var int */ |
||
| 12 | private $defender; |
||
| 13 | /** @var int */ |
||
| 14 | private $attacker; |
||
| 15 | /** @var int */ |
||
| 16 | private $player; |
||
| 17 | /** @var MatchId */ |
||
| 18 | private $match; |
||
| 19 | /** @var CorrelationId */ |
||
| 20 | private $correlationId; |
||
| 21 | |||
| 22 | private function __construct( |
||
| 23 | int $defender, |
||
| 24 | int $attacker, |
||
| 25 | int $player, |
||
| 26 | MatchId $match, |
||
| 27 | CorrelationId $correlationId |
||
| 28 | ) { |
||
| 29 | $this->defender = $defender; |
||
| 30 | $this->attacker = $attacker; |
||
| 31 | $this->player = $player; |
||
| 32 | $this->match = $match; |
||
| 33 | $this->correlationId = $correlationId; |
||
| 34 | } |
||
| 35 | |||
| 36 | |||
| 37 | public static function number( |
||
| 38 | int $attacker, |
||
| 39 | int $defender, |
||
| 40 | int $player, |
||
| 41 | MatchId $match, |
||
| 42 | CorrelationId $correlationId |
||
| 43 | ): self { |
||
| 44 | return new self($defender, $attacker, $player, $match, $correlationId); |
||
| 45 | } |
||
| 46 | |||
| 47 | public function defender(): int |
||
| 50 | } |
||
| 51 | |||
| 52 | public function attacker(): int |
||
| 55 | } |
||
| 56 | |||
| 57 | public function player(): int |
||
| 60 | } |
||
| 61 | |||
| 62 | public function match(): MatchId |
||
| 63 | { |
||
| 64 | return $this->match; |
||
| 65 | } |
||
| 66 | |||
| 67 | public function correlationId(): CorrelationId |
||
| 70 | } |
||
| 71 | } |
||
| 72 |