Skip to content

Commit 67f2b78

Browse files
committed
refactor: remove unneeded if check
Config\Cookie is now a must.
1 parent def9351 commit 67f2b78

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

system/HTTP/ResponseTrait.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -581,14 +581,11 @@ public function setCookie(
581581
return $this;
582582
}
583583

584-
/** @var CookieConfig|null $cookieConfig */
585584
$cookieConfig = config(CookieConfig::class);
586585

587-
if ($cookieConfig instanceof CookieConfig) {
588-
$secure ??= $cookieConfig->secure;
589-
$httponly ??= $cookieConfig->httponly;
590-
$samesite ??= $cookieConfig->samesite;
591-
}
586+
$secure ??= $cookieConfig->secure;
587+
$httponly ??= $cookieConfig->httponly;
588+
$samesite ??= $cookieConfig->samesite;
592589

593590
if (is_array($name)) {
594591
// always leave 'name' in last place, as the loop will break otherwise, due to ${$item}

0 commit comments

Comments
 (0)