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