mirror of
https://github.com/flarum/core.git
synced 2025-07-21 08:41:17 +02:00
PHP 8 support, cookie unit tests (#2507)
This commit is contained in:
@@ -77,7 +77,7 @@ class CookieFactory
|
||||
* @param int $maxAge
|
||||
* @return \Dflydev\FigCookies\SetCookie
|
||||
*/
|
||||
public function make($name, $value = null, $maxAge = null)
|
||||
public function make(string $name, string $value = null, int $maxAge = null): SetCookie
|
||||
{
|
||||
$cookie = SetCookie::create($this->getName($name), $value);
|
||||
|
||||
@@ -108,7 +108,7 @@ class CookieFactory
|
||||
* @param string $name
|
||||
* @return \Dflydev\FigCookies\SetCookie
|
||||
*/
|
||||
public function expire($name)
|
||||
public function expire(string $name): SetCookie
|
||||
{
|
||||
return $this->make($name)->expire();
|
||||
}
|
||||
@@ -119,7 +119,7 @@ class CookieFactory
|
||||
* @param string $name
|
||||
* @return string
|
||||
*/
|
||||
public function getName($name)
|
||||
public function getName(string $name): string
|
||||
{
|
||||
return $this->prefix.'_'.$name;
|
||||
}
|
||||
|
Reference in New Issue
Block a user