From 67f2b7884e1d8994d5b655703ec3ec2f53c73c29 Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 23 Oct 2023 13:27:25 +0900 Subject: [PATCH] refactor: remove unneeded if check Config\Cookie is now a must. --- system/HTTP/ResponseTrait.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/system/HTTP/ResponseTrait.php b/system/HTTP/ResponseTrait.php index b722ce97edd4..21d9abec8bac 100644 --- a/system/HTTP/ResponseTrait.php +++ b/system/HTTP/ResponseTrait.php @@ -581,14 +581,11 @@ public function setCookie( return $this; } - /** @var CookieConfig|null $cookieConfig */ $cookieConfig = config(CookieConfig::class); - if ($cookieConfig instanceof CookieConfig) { - $secure ??= $cookieConfig->secure; - $httponly ??= $cookieConfig->httponly; - $samesite ??= $cookieConfig->samesite; - } + $secure ??= $cookieConfig->secure; + $httponly ??= $cookieConfig->httponly; + $samesite ??= $cookieConfig->samesite; if (is_array($name)) { // always leave 'name' in last place, as the loop will break otherwise, due to ${$item}