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

NextTurnBegan   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 match() 0 3 1
A player() 0 3 1
A aggregateId() 0 3 1
A __construct() 0 4 1
1
<?php declare(strict_types=1);
2
3
namespace Stratadox\CardGame\Match\Event;
4
5
use Stratadox\CardGame\Match\MatchEvent;
6
use Stratadox\CardGame\Match\MatchId;
7
8
final class NextTurnBegan implements MatchEvent
9
{
10
    /** @var MatchId */
11
    private $match;
12
    /** @var int */
13
    private $player;
14
15
    public function __construct(MatchId $match, int $player)
16
    {
17
        $this->match = $match;
18
        $this->player = $player;
19
    }
20
21
    public function aggregateId(): MatchId
22
    {
23
        return $this->match;
24
    }
25
26
    public function player(): int
27
    {
28
        return $this->player;
29
    }
30
31
    public function match(): MatchId
32
    {
33
        return $this->aggregateId();
34
    }
35
}
36