| Total Complexity | 5 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class Member implements IMember, Serializable |
||
| 15 | { |
||
| 16 | /** @var string */ |
||
| 17 | private $hashedPassword; |
||
| 18 | |||
| 19 | /** @var string */ |
||
| 20 | private $username; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @api |
||
| 24 | * @param string $hashedPassword The hashed password of the member. |
||
| 25 | * @param string $username The member's username. |
||
| 26 | */ |
||
| 27 | public function __construct(string $hashedPassword, string $username) |
||
| 28 | { |
||
| 29 | $this->hashedPassword = $hashedPassword; |
||
| 30 | $this->username = $username; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return string The hashed password of the member. |
||
| 35 | */ |
||
| 36 | public function getHashedPassword(): string |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return string The username of the member. |
||
| 43 | */ |
||
| 44 | public function getUsername(): string |
||
| 47 | } |
||
| 48 | |||
| 49 | public function serialize() |
||
| 54 | ]); |
||
| 55 | } |
||
| 56 | |||
| 57 | public function unserialize($serialized) |
||
| 64 |