Total Complexity | 5 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
12 | class Auth |
||
13 | { |
||
14 | /** @var string */ |
||
15 | private $login; |
||
16 | |||
17 | /** @var string */ |
||
18 | private $cookiePath; |
||
19 | |||
20 | /** |
||
21 | * Auth constructor. |
||
22 | * @param string $login |
||
23 | * @param string $cookiePath |
||
24 | */ |
||
25 | 9 | public function __construct($login, $cookiePath) |
|
26 | { |
||
27 | 9 | $this->login = $login; |
|
28 | 9 | $this->cookiePath = $cookiePath; |
|
29 | 9 | } |
|
30 | |||
31 | /** |
||
32 | * Checks if the cookie file exists and if it's valid. |
||
33 | * @return bool |
||
34 | */ |
||
35 | 9 | public function isAuthenticated() |
|
51 | } |
||
52 | } |