Total Complexity | 7 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Coverage | 94.44% |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
10 | class User implements UserInterface |
||
11 | { |
||
12 | use ArrayConvertableTrait; |
||
13 | |||
14 | private ?string $id; |
||
15 | private string $username; |
||
16 | private string $email; |
||
17 | private string $password; |
||
18 | |||
19 | 4 | public function __construct(?string $id, string $username, string $email, string $password) |
|
20 | { |
||
21 | 4 | $this->id = $id; |
|
22 | 4 | $this->email = $email; |
|
23 | 4 | $this->username = $username; |
|
24 | 4 | $this->password = $password; |
|
25 | 4 | } |
|
26 | |||
27 | 4 | public function getPassword(): string |
|
28 | { |
||
29 | 4 | return $this->password; |
|
30 | } |
||
31 | |||
32 | 1 | public function getUsername(): string |
|
35 | } |
||
36 | |||
37 | 1 | public function getEmail(): string |
|
40 | } |
||
41 | |||
42 | 1 | public function getId(): ?string |
|
43 | { |
||
44 | 1 | return $this->id; |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * @throws Exception |
||
49 | */ |
||
50 | 1 | public function setId(string $id): void |
|
57 | 1 | } |
|
58 | } |
||
59 |