Total Complexity | 4 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
14 | class User implements Interfaces\IEmailUser |
||
15 | { |
||
16 | public string $email = ''; |
||
17 | public string $name = ''; |
||
18 | |||
19 | 15 | public function setData(string $email, string $name = ''): self |
|
20 | { |
||
21 | 15 | $this->name = $name; |
|
22 | 15 | $this->email = $email; |
|
23 | 15 | return $this; |
|
24 | } |
||
25 | |||
26 | 1 | public function sanitize(): self |
|
27 | { |
||
28 | 1 | $this->name = strval($this->name); |
|
29 | 1 | $this->email = strval($this->email); |
|
30 | 1 | return $this; |
|
31 | } |
||
32 | |||
33 | 3 | public function getEmail(): string |
|
36 | } |
||
37 | |||
38 | 1 | public function getEmailName(): string |
|
41 | } |
||
42 | } |
||
43 |