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

UnitMovedIntoPlay::player()   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\Event;
4
5
use Stratadox\CardGame\Deck\CardId;
6
use Stratadox\CardGame\Match\MatchEvent;
7
use Stratadox\CardGame\Match\MatchId;
8
9
final class UnitMovedIntoPlay implements MatchEvent
10
{
11
    private $card;
12
    private $match;
13
    private $player;
14
15
    public function __construct(
16
        MatchId $match,
17
        CardId $card,
18
        int $player
19
    ) {
20
        $this->card = $card;
21
        $this->match = $match;
22
        $this->player = $player;
23
    }
24
25
    public function aggregateId(): MatchId
26
    {
27
        return $this->match;
28
    }
29
30
    public function match(): MatchId
31
    {
32
        return $this->aggregateId();
33
    }
34
35
    public function card(): CardId
36
    {
37
        return $this->card;
38
    }
39
40
    public function player(): int
41
    {
42
        return $this->player;
43
    }
44
}
45