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

EndBlocking   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A player() 0 3 1
A match() 0 3 1
A __construct() 0 4 1
A phase() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Stratadox\CardGame\Match\Command;
4
5
use Stratadox\CardGame\Match\MatchId;
6
7
final class EndBlocking
8
{
9
    /** @var MatchId */
10
    private $match;
11
    /** @var int */
12
    private $player;
13
14
    public function __construct(MatchId $match, int $player)
15
    {
16
        $this->match = $match;
17
        $this->player = $player;
18
    }
19
20
    public static function phase(MatchId $match, int $player): self
21
    {
22
        return new self($match, $player);
23
    }
24
25
    public function match(): MatchId
26
    {
27
        return $this->match;
28
    }
29
30
    public function player(): int
31
    {
32
        return $this->player;
33
    }
34
}
35