| @@ 13-46 (lines=34) @@ | ||
| 10 | * |
|
| 11 | * @author Hugues Maignol <[email protected]> |
|
| 12 | */ |
|
| 13 | final class ChangeEmail extends UserCommand |
|
| 14 | { |
|
| 15 | /** |
|
| 16 | * @var string |
|
| 17 | */ |
|
| 18 | private $email; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * @var Identity |
|
| 22 | */ |
|
| 23 | private $userId; |
|
| 24 | ||
| 25 | public function __construct(string $email, Identity $userId) |
|
| 26 | { |
|
| 27 | $this->email = $email; |
|
| 28 | $this->userId = $userId; |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return string |
|
| 33 | */ |
|
| 34 | public function getEmail(): string |
|
| 35 | { |
|
| 36 | return $this->email; |
|
| 37 | } |
|
| 38 | ||
| 39 | /** |
|
| 40 | * @return Identity |
|
| 41 | */ |
|
| 42 | public function getUserId(): Identity |
|
| 43 | { |
|
| 44 | return $this->userId; |
|
| 45 | } |
|
| 46 | } |
|
| 47 | ||
| @@ 12-47 (lines=36) @@ | ||
| 9 | * |
|
| 10 | * @author Hugues Maignol <[email protected]> |
|
| 11 | */ |
|
| 12 | final class EmailConfirmed extends UserEvent |
|
| 13 | { |
|
| 14 | /** |
|
| 15 | * @var Identity |
|
| 16 | */ |
|
| 17 | private $userId; |
|
| 18 | ||
| 19 | /** |
|
| 20 | * @var string |
|
| 21 | */ |
|
| 22 | private $email; |
|
| 23 | ||
| 24 | public function __construct(Identity $userId, string $email) |
|
| 25 | { |
|
| 26 | $this->userId = $userId; |
|
| 27 | $this->email = $email; |
|
| 28 | } |
|
| 29 | ||
| 30 | /** |
|
| 31 | * Getter de email |
|
| 32 | * |
|
| 33 | * @return string |
|
| 34 | */ |
|
| 35 | public function getEmail() |
|
| 36 | { |
|
| 37 | return $this->email; |
|
| 38 | } |
|
| 39 | ||
| 40 | /** |
|
| 41 | * @return Identity |
|
| 42 | */ |
|
| 43 | public function getUserId(): Identity |
|
| 44 | { |
|
| 45 | return $this->userId; |
|
| 46 | } |
|
| 47 | } |
|
| 48 | ||