Total Complexity | 4 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class AuthResponse |
||
6 | { |
||
7 | private bool $isAuth; |
||
8 | private ?int $userId; |
||
9 | private ?string $key; |
||
10 | |||
11 | 4 | public function __construct(bool $isAuth, ?int $userId = null, ?string $key = null) |
|
12 | { |
||
13 | 4 | $this->isAuth = $isAuth; |
|
14 | 4 | $this->userId = $userId; |
|
15 | 4 | $this->key = $key; |
|
16 | 4 | } |
|
17 | |||
18 | /** |
||
19 | * @return bool |
||
20 | */ |
||
21 | 4 | public function isAuth(): bool |
|
22 | { |
||
23 | 4 | return $this->isAuth; |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * @return int|null |
||
28 | */ |
||
29 | 4 | public function getUserId(): ?int |
|
30 | { |
||
31 | 4 | return $this->userId; |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return string|null |
||
36 | */ |
||
37 | 4 | public function getKey(): ?string |
|
40 | } |
||
41 | } |
||
42 |