Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
9 | final class AcceptTheProposal implements Command |
||
10 | { |
||
11 | private $proposalId; |
||
12 | private $acceptingPlayer; |
||
13 | private $correlationId; |
||
14 | |||
15 | private function __construct( |
||
16 | ProposalId $id, |
||
17 | AccountId $acceptingPlayer, |
||
18 | CorrelationId $correlationId |
||
19 | ) { |
||
20 | $this->proposalId = $id; |
||
21 | $this->acceptingPlayer = $acceptingPlayer; |
||
22 | $this->correlationId = $correlationId; |
||
23 | } |
||
24 | |||
25 | public static function withId( |
||
26 | ProposalId $id, |
||
27 | AccountId $acceptingPlayer, |
||
28 | CorrelationId $correlationId |
||
29 | ): self { |
||
30 | return new self($id, $acceptingPlayer, $correlationId); |
||
31 | } |
||
32 | |||
33 | public function proposal(): ProposalId |
||
36 | } |
||
37 | |||
38 | public function acceptingPlayer(): AccountId |
||
41 | } |
||
42 | |||
43 | public function correlationId(): CorrelationId |
||
46 | } |
||
47 | } |
||
48 |