Total Complexity | 6 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
16 | final class User |
||
17 | { |
||
18 | public string $uuid; |
||
19 | public string $username; |
||
20 | public string $email; |
||
21 | public ?string $password; |
||
22 | public array $roles; |
||
23 | |||
24 | public function __construct( |
||
25 | string $uuid, |
||
26 | string $username, |
||
27 | string $email, |
||
28 | ?string $password = null, |
||
29 | array $roles = [] |
||
30 | ) { |
||
31 | $this->uuid = $uuid; |
||
32 | $this->username = $username; |
||
33 | $this->email = $email; |
||
34 | $this->password = $password; |
||
35 | $this->roles = $roles; |
||
36 | } |
||
37 | |||
38 | public function uuid(): ?string |
||
39 | { |
||
40 | return $this->uuid; |
||
41 | } |
||
42 | |||
43 | public function username(): string |
||
44 | { |
||
45 | return $this->username; |
||
46 | } |
||
47 | |||
48 | public function email(): string |
||
51 | } |
||
52 | |||
53 | public function password(): ?string |
||
54 | { |
||
55 | return $this->password; |
||
56 | } |
||
57 | |||
58 | public function roles(): array |
||
61 | } |
||
62 | } |
||
63 |