Skip to content

Commit

Permalink
Ref: T2800 (#2)
Browse files Browse the repository at this point in the history
- Allow arrays in cookie handler
  • Loading branch information
Nikolay Brankov authored Dec 1, 2021
1 parent ec8a6de commit c7708b3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 7 additions & 1 deletion src/Cookies/AbstractCookieHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@

abstract class AbstractCookieHandler implements CookieHandler
{
public function canHandle(string $name, string $value = null): bool
/**
* @param string $name
* @param string|array|null $value
*
* @return bool
*/
public function canHandle(string $name, $value = null): bool
{
return true;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Cookies/CookieHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ interface CookieHandler
/**
* Check to see if the handler can handle a cookie
*
* @param string $name
* @param string|null $value
* @param string $name
* @param string|array|null $value
*
* @return bool
*/
public function canHandle(string $name, string $value = null): bool;
public function canHandle(string $name, $value = null): bool;

/**
* Decode a cookie name from transport
Expand Down
8 changes: 7 additions & 1 deletion src/Cookies/DefaultHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@

class DefaultHandler extends AbstractCookieHandler
{
public function canHandle(string $name, string $value = null): bool
/**
* @param string $name
* @param string|array|null $value
*
* @return bool
*/
public function canHandle(string $name, $value = null): bool
{
return true;
}
Expand Down

0 comments on commit c7708b3

Please sign in to comment.