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

UnitDied   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 __construct() 0 4 1
A match() 0 3 1
A aggregateId() 0 3 1
A card() 0 3 1
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 UnitDied implements MatchEvent
10
{
11
    /** @var MatchId */
12
    private $match;
13
    /** @var CardId */
14
    private $card;
15
16
    public function __construct(MatchId $match, CardId $card)
17
    {
18
        $this->match = $match;
19
        $this->card = $card;
20
    }
21
22
    public function aggregateId(): MatchId
23
    {
24
        return $this->match;
25
    }
26
27
    public function match(): MatchId
28
    {
29
        return $this->aggregateId();
30
    }
31
32
    public function card(): CardId
33
    {
34
        return $this->card;
35
    }
36
}
37