| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 54 | public function offsetSet(mixed $offset, mixed $value): void |
||
| 55 | { |
||
| 56 | $success = setcookie($offset, $value, time() + $this->ttl, $this->path, $this->domain, $this->secure, true); |
||
| 57 | |||
| 58 | if (!$success) { |
||
| 59 | throw new \RuntimeException("Failed to set cookie '$offset'"); |
||
| 60 | } |
||
| 61 | |||
| 62 | $_COOKIE[$offset] = $value; |
||
| 63 | } |
||
| 74 |