| Total Complexity | 6 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 8 | final class PlayTheCard |
||
| 9 | { |
||
| 10 | private $offset; |
||
| 11 | private $player; |
||
| 12 | private $match; |
||
| 13 | private $correlationId; |
||
| 14 | |||
| 15 | private function __construct( |
||
| 16 | int $offset, |
||
| 17 | int $player, |
||
| 18 | MatchId $match, |
||
| 19 | CorrelationId $correlationId |
||
| 20 | ) { |
||
| 21 | $this->offset = $offset; |
||
| 22 | $this->player = $player; |
||
| 23 | $this->match = $match; |
||
| 24 | $this->correlationId = $correlationId; |
||
| 25 | } |
||
| 26 | |||
| 27 | public static function number( |
||
| 28 | int $offset, |
||
| 29 | int $player, |
||
| 30 | MatchId $match, |
||
| 31 | CorrelationId $correlationId |
||
| 32 | ): self { |
||
| 33 | return new self($offset, $player, $match, $correlationId); |
||
| 34 | } |
||
| 35 | |||
| 36 | public function cardNumber(): int |
||
| 37 | { |
||
| 38 | return $this->offset; |
||
| 39 | } |
||
| 40 | |||
| 41 | public function player(): int |
||
| 42 | { |
||
| 43 | return $this->player; |
||
| 44 | } |
||
| 45 | |||
| 46 | public function match(): MatchId |
||
| 49 | } |
||
| 50 | |||
| 51 | public function correlationId(): CorrelationId |
||
| 52 | { |
||
| 53 | return $this->correlationId; |
||
| 56 |