1
0
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:
Daniël Klabbers
2021-01-26 23:53:28 +01:00
committed by GitHub
parent ec9e194243
commit 8fdddf91a2
7 changed files with 89 additions and 18 deletions

View File

@@ -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;
}