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

UnitMovedToAttack::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 6
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 UnitMovedToAttack implements MatchEvent
10
{
11
    private $card;
12
    private $match;
13
14
    public function __construct(
15
        MatchId $match,
16
        CardId $card
17
    ) {
18
        $this->card = $card;
19
        $this->match = $match;
20
    }
21
22
    public function aggregateId(): MatchId
23
    {
24
        return $this->match;
25
    }
26
27
    public function card(): CardId
28
    {
29
        return $this->card;
30
    }
31
}
32