Total Complexity | 6 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class Cookie implements CookieInterface |
||
15 | { |
||
16 | protected string $name; |
||
17 | |||
18 | /** |
||
19 | * Options for `setcookie()` |
||
20 | * @var array<string,mixed> |
||
21 | */ |
||
22 | protected array $options; |
||
23 | |||
24 | /** |
||
25 | * Cookies constructor. |
||
26 | * |
||
27 | * @param string $name |
||
28 | * @param array<string,mixed> $options |
||
29 | */ |
||
30 | public function __construct(string $name, array $options = []) |
||
31 | { |
||
32 | $this->name = $name; |
||
33 | $this->options = array_change_key_case($options, CASE_LOWER); |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @inheritDoc |
||
38 | */ |
||
39 | public function get(): ?string |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @inheritDoc |
||
46 | */ |
||
47 | public function set(string $value, int $expire): void |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @inheritDoc |
||
60 | */ |
||
61 | public function clear(): void |
||
70 | } |
||
71 | } |
||
72 |