public static function open(AccountOwner $owner) { $account = new self($owner, VirtualMoney::coins(0)); $account->record(new AccountOpened($owner->value(), new DateTimeImmutable())); return $account; }
public function search(AccountOwner $owner) { return $this->accounts->get($owner->value()); }