Skip to content

Commit e0c7805

Browse files
committed
Cast to return type
1 parent 0023ea0 commit e0c7805

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Http/SetCookie.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function setPath(string $path): void
216216
*/
217217
public function getMaxAge(): ?int
218218
{
219-
return $this->data['Max-Age'];
219+
return $this->data['Max-Age'] == null ? null : (int) $this->data['Max-Age'];
220220
}
221221

222222
/**
@@ -292,7 +292,7 @@ public function setDiscard(bool $discard): void
292292
*/
293293
public function getHttpOnly(): bool
294294
{
295-
return $this->data['HttpOnly'];
295+
return (bool) $this->data['HttpOnly'];
296296
}
297297

298298
/**

0 commit comments

Comments
 (0)