Total Complexity | 5 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Changes | 6 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class UserService implements ServiceInterface |
||
13 | { |
||
14 | private array $users = []; |
||
15 | private bool $authenticated = false; |
||
16 | |||
17 | /** |
||
18 | * Registers a new user |
||
19 | * -------------------- |
||
20 | * Регистрирует нового пользователя |
||
21 | * |
||
22 | * @param string $name |
||
23 | * @return string |
||
24 | */ |
||
25 | public function register(string $name): string |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Identifies the user |
||
38 | * ------------------- |
||
39 | * Идентифицирует пользователя |
||
40 | * |
||
41 | * @param string $name |
||
42 | * @return string |
||
43 | */ |
||
44 | public function login(string $name): string |
||
59 |