Skip to content

Commit c7708b3

Browse files
author
Nikolay Brankov
authored
Ref: T2800 (#2)
- Allow arrays in cookie handler
1 parent ec8a6de commit c7708b3

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

src/Cookies/AbstractCookieHandler.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44

55
abstract class AbstractCookieHandler implements CookieHandler
66
{
7-
public function canHandle(string $name, string $value = null): bool
7+
/**
8+
* @param string $name
9+
* @param string|array|null $value
10+
*
11+
* @return bool
12+
*/
13+
public function canHandle(string $name, $value = null): bool
814
{
915
return true;
1016
}

src/Cookies/CookieHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ interface CookieHandler
77
/**
88
* Check to see if the handler can handle a cookie
99
*
10-
* @param string $name
11-
* @param string|null $value
10+
* @param string $name
11+
* @param string|array|null $value
1212
*
1313
* @return bool
1414
*/
15-
public function canHandle(string $name, string $value = null): bool;
15+
public function canHandle(string $name, $value = null): bool;
1616

1717
/**
1818
* Decode a cookie name from transport

src/Cookies/DefaultHandler.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44

55
class DefaultHandler extends AbstractCookieHandler
66
{
7-
public function canHandle(string $name, string $value = null): bool
7+
/**
8+
* @param string $name
9+
* @param string|array|null $value
10+
*
11+
* @return bool
12+
*/
13+
public function canHandle(string $name, $value = null): bool
814
{
915
return true;
1016
}

0 commit comments

Comments
 (0)