Total Complexity | 3 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | abstract class AppUser |
||
15 | { |
||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $id; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $email; |
||
25 | |||
26 | /** |
||
27 | * @param string $id the unique id of the application's user entity. ex: a UUID |
||
28 | * @param string $email the email address of the application's user entity |
||
29 | */ |
||
30 | 10 | public function __construct($id, $email) |
|
31 | { |
||
32 | 10 | $this->id = $id; |
|
33 | 10 | $this->email = $email; |
|
34 | 10 | } |
|
35 | |||
36 | /** |
||
37 | * @return string |
||
38 | */ |
||
39 | 10 | public function id() |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | 8 | public function email() |
|
50 | } |
||
51 | |||
52 | /** |
||
53 | * Returns true if this user is an existing user or newly created one. |
||
54 | * |
||
55 | * @return bool |
||
56 | */ |
||
57 | abstract public function isExistingUser(); |
||
58 | } |
||
59 |