@@ -53,8 +53,7 @@ discard block |
||
53 | 53 | * @class CookieManager |
54 | 54 | * @package Platine\Cookie |
55 | 55 | */ |
56 | -class CookieManager implements CookieManagerInterface |
|
57 | -{ |
|
56 | +class CookieManager implements CookieManagerInterface { |
|
58 | 57 | /** |
59 | 58 | * The cookies |
60 | 59 | * @var CookieInterface[] |
@@ -65,8 +64,7 @@ discard block |
||
65 | 64 | * Create new instance |
66 | 65 | * @param CookieInterface[] $cookies the default cookies to store |
67 | 66 | */ |
68 | - public function __construct(array $cookies = []) |
|
69 | - { |
|
67 | + public function __construct(array $cookies = []) { |
|
70 | 68 | foreach ($cookies as $cookie) { |
71 | 69 | $this->add($cookie); |
72 | 70 | } |
@@ -57,8 +57,7 @@ |
||
57 | 57 | * @class CookieSendMiddleware |
58 | 58 | * @package Platine\Cookie\Middleware |
59 | 59 | */ |
60 | -class CookieSendMiddleware implements MiddlewareInterface |
|
61 | -{ |
|
60 | +class CookieSendMiddleware implements MiddlewareInterface { |
|
62 | 61 | /** |
63 | 62 | * Create new instance |
64 | 63 | * @param CookieManagerInterface $cookies The cookie manager instance |
@@ -53,8 +53,7 @@ |
||
53 | 53 | * @class CookieManagerInterface |
54 | 54 | * @package Platine\Cookie |
55 | 55 | */ |
56 | -interface CookieManagerInterface |
|
57 | -{ |
|
56 | +interface CookieManagerInterface { |
|
58 | 57 | /** |
59 | 58 | * Set the cookie |
60 | 59 | * |
@@ -150,7 +150,7 @@ |
||
150 | 150 | * |
151 | 151 | * @return CookieInterface |
152 | 152 | */ |
153 | - public function withExpires(int|string|DateTimeInterface|null $expire = null): self; |
|
153 | + public function withExpires(int | string | DateTimeInterface | null $expire = null): self; |
|
154 | 154 | |
155 | 155 | /** |
156 | 156 | * Return the domain of the cookie |
@@ -60,8 +60,7 @@ |
||
60 | 60 | * change state MUST be implemented such that they retain the internal state of |
61 | 61 | * the current instance and return an instance that contains the changed state. |
62 | 62 | */ |
63 | -interface CookieInterface extends Stringable |
|
64 | -{ |
|
63 | +interface CookieInterface extends Stringable { |
|
65 | 64 | /** |
66 | 65 | * Same site policy "None" |
67 | 66 | */ |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | public function __construct( |
130 | 130 | string $name, |
131 | 131 | string $value = '', |
132 | - int|string|DateTimeInterface|null $expire = null, |
|
132 | + int | string | DateTimeInterface | null $expire = null, |
|
133 | 133 | ?string $domain = null, |
134 | 134 | ?string $path = '/', |
135 | 135 | ?bool $secure = true, |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | /** |
224 | 224 | * {@inheritdoc} |
225 | 225 | */ |
226 | - public function withExpires(int|string|DateTimeInterface|null $expire = null): self |
|
226 | + public function withExpires(int | string | DateTimeInterface | null $expire = null): self |
|
227 | 227 | { |
228 | 228 | if ($expire === $this->expires) { |
229 | 229 | return $this; |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | * Set the cookie expires |
441 | 441 | * @param int|string|DateTimeInterface|null $expire |
442 | 442 | */ |
443 | - private function setExpires(int|string|DateTimeInterface|null $expire): self |
|
443 | + private function setExpires(int | string | DateTimeInterface | null $expire): self |
|
444 | 444 | { |
445 | 445 | if ($expire === null || (is_string($expire) && empty($expire))) { |
446 | 446 | $expire = 0; |
@@ -54,8 +54,7 @@ |
||
54 | 54 | * @class Cookie |
55 | 55 | * @package Platine\Cookie |
56 | 56 | */ |
57 | -class Cookie implements CookieInterface |
|
58 | -{ |
|
57 | +class Cookie implements CookieInterface { |
|
59 | 58 | /** |
60 | 59 | * The name of the cookie |
61 | 60 | * |