🔧
This commit is contained in:
@@ -86,7 +86,7 @@ class ResponseHeaderBag extends HeaderBag
|
||||
}
|
||||
}
|
||||
|
||||
public function all(string $key = null): array
|
||||
public function all(?string $key = null): array
|
||||
{
|
||||
$headers = parent::all();
|
||||
|
||||
@@ -183,7 +183,7 @@ class ResponseHeaderBag extends HeaderBag
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function removeCookie(string $name, ?string $path = '/', string $domain = null)
|
||||
public function removeCookie(string $name, ?string $path = '/', ?string $domain = null)
|
||||
{
|
||||
$path ??= '/';
|
||||
|
||||
@@ -234,11 +234,15 @@ class ResponseHeaderBag extends HeaderBag
|
||||
/**
|
||||
* Clears a cookie in the browser.
|
||||
*
|
||||
* @param bool $partitioned
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function clearCookie(string $name, ?string $path = '/', string $domain = null, bool $secure = false, bool $httpOnly = true, string $sameSite = null)
|
||||
public function clearCookie(string $name, ?string $path = '/', ?string $domain = null, bool $secure = false, bool $httpOnly = true, ?string $sameSite = null /* , bool $partitioned = false */)
|
||||
{
|
||||
$this->setCookie(new Cookie($name, null, 1, $path, $domain, $secure, $httpOnly, false, $sameSite));
|
||||
$partitioned = 6 < \func_num_args() ? \func_get_arg(6) : false;
|
||||
|
||||
$this->setCookie(new Cookie($name, null, 1, $path, $domain, $secure, $httpOnly, false, $sameSite, $partitioned));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user