Completed
Push — master ( 4b1e3c...30d3d2 )
by Jesse
02:57
created

EndTheTurn::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Stratadox\CardGame\Match\Command;
4
5
use Stratadox\CardGame\Match\MatchId;
6
7
final class EndTheTurn
8
{
9
    private $match;
10
    private $player;
11
12
    public function __construct(MatchId $match, int $player)
13
    {
14
        $this->match = $match;
15
        $this->player = $player;
16
    }
17
18
    public static function for(MatchId $match, int $player): self
19
    {
20
        return new self($match, $player);
21
    }
22
23
    public function match(): MatchId
24
    {
25
        return $this->match;
26
    }
27
28
    public function player(): int
29
    {
30
        return $this->player;
31
    }
32
}
33