Total Complexity | 4 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
9 | final class OpenAnAccount implements Command |
||
10 | { |
||
11 | private $visitorId; |
||
12 | private $correlationId; |
||
13 | |||
14 | private function __construct(VisitorId $visitorId, CorrelationId $correlationId) |
||
15 | { |
||
16 | $this->visitorId = $visitorId; |
||
17 | $this->correlationId = $correlationId; |
||
18 | } |
||
19 | |||
20 | public static function forVisitorWith( |
||
21 | VisitorId $visitorId, |
||
22 | CorrelationId $correlationId |
||
23 | ): self { |
||
24 | return new self($visitorId, $correlationId); |
||
25 | } |
||
26 | |||
27 | public function visitorId(): VisitorId |
||
28 | { |
||
29 | return $this->visitorId; |
||
30 | } |
||
31 | |||
32 | public function correlationId(): CorrelationId |
||
35 | } |
||
36 | } |
||
37 |