| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | public function set(string $value, int $expire): void |
||
| 48 | { |
||
| 49 | $success = setcookie($this->name, $value, ['expire' => $expire] + $this->options); |
||
| 50 | |||
| 51 | if (!$success) { |
||
| 52 | throw new RuntimeException("Failed to set cookie '{$this->name}'"); |
||
| 53 | } |
||
| 54 | |||
| 55 | $_COOKIE[$this->name] = $value; |
||
| 56 | } |
||
| 72 |