/** * @param AccountId $accountId * @param Credentials $credentials */ public function __construct(AccountId $accountId, Credentials $credentials) { $this->email = $credentials->getEmail(); $this->password = $credentials->getPassword(); $this->salt = $credentials->getSalt(); $this->accountId = $accountId; }
/** * @return array */ public function serialize() { return ['id' => $this->id, 'email' => $this->credentials->getEmail(), 'password' => $this->credentials->getPassword(), 'salt' => $this->credentials->getSalt()]; }