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

EndTheTurn   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A for() 0 3 1
A player() 0 3 1
A __construct() 0 4 1
A match() 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 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