Skip to content

Commit 07bdeff

Browse files
authored
Merge pull request #13 from escannord/main
definition of facades in static
2 parents a476cb4 + 0d55f91 commit 07bdeff

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Facades/Cookie.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ public static function options(
7676
/**
7777
* Gets all cookies.
7878
*/
79-
public function all(): array
79+
public static function all(): array
8080
{
8181
return self::getInstance()->all();
8282
}
8383

8484
/**
8585
* Checks if a cookie exists.
8686
*/
87-
public function has(string $name): bool
87+
public static function has(string $name): bool
8888
{
8989
return self::getInstance()->has($name);
9090
}
@@ -94,7 +94,7 @@ public function has(string $name): bool
9494
*
9595
* Optionally defines a default value when the cookie does not exist.
9696
*/
97-
public function get(string $name, mixed $default = null): mixed
97+
public static function get(string $name, mixed $default = null): mixed
9898
{
9999
return self::getInstance()->get($name, $default);
100100
}
@@ -110,7 +110,7 @@ public function get(string $name, mixed $default = null): mixed
110110
*
111111
* @throws CookieException if headers already sent.
112112
*/
113-
public function set(string $name, mixed $value, null|int|DateTime $expires = null): void
113+
public static function set(string $name, mixed $value, null|int|DateTime $expires = null): void
114114
{
115115
self::getInstance()->set($name, $value, $expires);
116116
}
@@ -129,7 +129,7 @@ public function set(string $name, mixed $value, null|int|DateTime $expires = nul
129129
*
130130
* @throws CookieException if headers already sent.
131131
*/
132-
public function replace(array $data, null|int|DateTime $expires = null): void
132+
public static function replace(array $data, null|int|DateTime $expires = null): void
133133
{
134134
self::getInstance()->replace($data, $expires);
135135
}
@@ -141,7 +141,7 @@ public function replace(array $data, null|int|DateTime $expires = null): void
141141
*
142142
* @throws CookieException if headers already sent.
143143
*/
144-
public function pull(string $name, mixed $default = null): mixed
144+
public static function pull(string $name, mixed $default = null): mixed
145145
{
146146
return self::getInstance()->pull($name, $default);
147147
}
@@ -151,7 +151,7 @@ public function pull(string $name, mixed $default = null): mixed
151151
*
152152
* @throws CookieException if headers already sent.
153153
*/
154-
public function remove(string $name): void
154+
public static function remove(string $name): void
155155
{
156156
self::getInstance()->remove($name);
157157
}
@@ -161,7 +161,7 @@ public function remove(string $name): void
161161
*
162162
* @throws CookieException if headers already sent.
163163
*/
164-
public function clear(): void
164+
public static function clear(): void
165165
{
166166
self::getInstance()->clear();
167167
}

0 commit comments

Comments
 (0)