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