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

StartTheMatch::correlationId()   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\Command;
4
5
use Stratadox\CardGame\CorrelationId;
6
use Stratadox\CardGame\Proposal\ProposalId;
7
8
final class StartTheMatch
9
{
10
    private $proposal;
11
    private $correlationId;
12
13
    public function __construct(ProposalId $proposal, CorrelationId $correlationId)
14
    {
15
        $this->proposal = $proposal;
16
        $this->correlationId = $correlationId;
17
    }
18
19
    public static function forProposal(
20
        ProposalId $proposal,
21
        CorrelationId $correlationId
22
    ): self {
23
        return new self($proposal, $correlationId);
24
    }
25
26
    public function proposal(): ProposalId
27
    {
28
        return $this->proposal;
29
    }
30
31
    public function correlationId(): CorrelationId
32
    {
33
        return $this->correlationId;
34
    }
35
}
36