Total Complexity | 4 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | abstract class AMethods |
||
18 | { |
||
19 | protected ?IAuth $authenticator = null; |
||
20 | protected ?AMethods $nextOne = null; |
||
21 | protected ?IUser $loggedUser = null; |
||
22 | |||
23 | 25 | public function __construct(?IAuth $authenticator, ?AMethods $nextOne) |
|
24 | { |
||
25 | 25 | $this->authenticator = $authenticator; |
|
26 | 25 | $this->nextOne = $nextOne; |
|
27 | 25 | } |
|
28 | |||
29 | /** |
||
30 | * @param \ArrayAccess<string, string|int|float> $credentials |
||
31 | * @throws AccountsException |
||
32 | * @throws AuthException |
||
33 | */ |
||
34 | abstract public function process(\ArrayAccess $credentials): void; |
||
35 | |||
36 | abstract public function remove(): void; |
||
37 | |||
38 | 20 | public function isAuthorized(): bool |
|
41 | } |
||
42 | |||
43 | 3 | public function getLoggedUser(): ?IUser |
|
46 | } |
||
47 | |||
48 | 2 | public function getNextMethod(): ?AMethods |
|
53 |