Total Complexity | 5 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | final class Cookie extends \WebServCo\Framework\AbstractLibrary |
||
8 | { |
||
9 | public function get(string $name, string $defaultValue = ''): string |
||
12 | } |
||
13 | |||
14 | public function remove(string $name): bool |
||
15 | { |
||
16 | if (!isset($_COOKIE[$name])) { |
||
17 | return false; |
||
18 | } |
||
19 | |||
20 | |||
21 | unset($_COOKIE[$name]); |
||
22 | $this->set($name, '', -1); |
||
23 | return true; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @param string $name, |
||
28 | * @param string $value, |
||
29 | * @param int $expires, |
||
30 | * @param string $path, |
||
31 | * @param string $domain, |
||
32 | * @param bool $secure, |
||
33 | * @param bool $httponly, |
||
34 | * @param 'Lax'|'None'|'Strict' $samesite |
||
|
|||
35 | */ |
||
36 | public function set( |
||
59 | ], |
||
60 | ); |
||
63 |