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

MatchHasBegun::aggregateId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
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 MatchHasBegun implements MatchEvent
9
{
10
    private $match;
11
    private $whoBegins;
12
13
    public function __construct(MatchId $match, int $whoBegins)
14
    {
15
        $this->match = $match;
16
        $this->whoBegins = $whoBegins;
17
    }
18
19
    public function aggregateId(): MatchId
20
    {
21
        return $this->match;
22
    }
23
24
    public function whoBegins(): int
25
    {
26
        return $this->whoBegins;
27
    }
28
}
29