Total Complexity | 8 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | class User extends UserDomain implements UserInterface |
||
23 | { |
||
24 | public static function create( |
||
25 | UserUuid $uuid, |
||
26 | NameField $username, |
||
27 | EmailField $email, |
||
28 | string $password, |
||
29 | array $roles = [] |
||
30 | ): self { |
||
31 | return new self($uuid, $username, $email, $password, $roles); |
||
32 | } |
||
33 | |||
34 | public function getUuid(): string |
||
35 | { |
||
36 | return $this->uuid()->toString(); |
||
37 | } |
||
38 | |||
39 | public function getUsername(): string |
||
40 | { |
||
41 | return $this->username(); |
||
42 | } |
||
43 | |||
44 | public function getEmail(): string |
||
45 | { |
||
46 | return $this->email()->getValue(); |
||
47 | } |
||
48 | |||
49 | public function getPassword(): string |
||
50 | { |
||
51 | return $this->password(); |
||
52 | } |
||
53 | |||
54 | public function getRoles(): array |
||
57 | } |
||
58 | |||
59 | public function getSalt(): ?string |
||
60 | { |
||
61 | return null; |
||
62 | } |
||
63 | |||
64 | public function eraseCredentials(): void |
||
66 | } |
||
67 | } |
||
68 |