| Total Complexity | 4 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 12 | final class PlayerAccount implements DomainEventRecorder |
||
| 13 | { |
||
| 14 | use DomainEventRecording; |
||
| 15 | |||
| 16 | private $id; |
||
| 17 | |||
| 18 | private function __construct(AccountId $id, AccountEvent $creationEvent) |
||
| 19 | { |
||
| 20 | $this->id = $id; |
||
| 21 | $this->events[] = $creationEvent; |
||
| 22 | } |
||
| 23 | |||
| 24 | public static function fromVisitor(VisitorId $visitor, AccountId $id): self |
||
| 25 | { |
||
| 26 | return new self($id, VisitorOpenedAnAccount::with($id, $visitor)); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function id(): AccountId |
||
| 30 | { |
||
| 31 | return $this->id; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function proposeMatchTo( |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |