Passed
Push — master ( 4e3abd...c23c95 )
by Jesse
02:09
created

EndBlocking::match()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
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\Command;
6
use Stratadox\CardGame\CorrelationId;
7
use Stratadox\CardGame\Match\MatchId;
8
9
final class EndBlocking implements Command
10
{
11
    /** @var MatchId */
12
    private $match;
13
    /** @var int */
14
    private $player;
15
    /** @var CorrelationId */
16
    private $correlationId;
17
18
    public function __construct(
19
        MatchId $match,
20
        int $player,
21
        CorrelationId $correlationId
22
    ) {
23
        $this->match = $match;
24
        $this->player = $player;
25
        $this->correlationId = $correlationId;
26
    }
27
28
    public static function phase(
29
        MatchId $match,
30
        int $player,
31
        CorrelationId $correlationId
32
    ): self {
33
        return new self($match, $player, $correlationId);
34
    }
35
36
    public function match(): MatchId
37
    {
38
        return $this->match;
39
    }
40
41
    public function player(): int
42
    {
43
        return $this->player;
44
    }
45
46
    public function correlationId(): CorrelationId
47
    {
48
        return $this->correlationId;
49
    }
50
}
51