Skip to content

Commit

Permalink
Merge pull request #13 from escannord/main
Browse files Browse the repository at this point in the history
definition of facades in static
  • Loading branch information
josantonius authored Sep 11, 2024
2 parents a476cb4 + 0d55f91 commit 07bdeff
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Facades/Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ public static function options(
/**
* Gets all cookies.
*/
public function all(): array
public static function all(): array
{
return self::getInstance()->all();
}

/**
* Checks if a cookie exists.
*/
public function has(string $name): bool
public static function has(string $name): bool
{
return self::getInstance()->has($name);
}
Expand All @@ -94,7 +94,7 @@ public function has(string $name): bool
*
* Optionally defines a default value when the cookie does not exist.
*/
public function get(string $name, mixed $default = null): mixed
public static function get(string $name, mixed $default = null): mixed
{
return self::getInstance()->get($name, $default);
}
Expand All @@ -110,7 +110,7 @@ public function get(string $name, mixed $default = null): mixed
*
* @throws CookieException if headers already sent.
*/
public function set(string $name, mixed $value, null|int|DateTime $expires = null): void
public static function set(string $name, mixed $value, null|int|DateTime $expires = null): void
{
self::getInstance()->set($name, $value, $expires);
}
Expand All @@ -129,7 +129,7 @@ public function set(string $name, mixed $value, null|int|DateTime $expires = nul
*
* @throws CookieException if headers already sent.
*/
public function replace(array $data, null|int|DateTime $expires = null): void
public static function replace(array $data, null|int|DateTime $expires = null): void
{
self::getInstance()->replace($data, $expires);
}
Expand All @@ -141,7 +141,7 @@ public function replace(array $data, null|int|DateTime $expires = null): void
*
* @throws CookieException if headers already sent.
*/
public function pull(string $name, mixed $default = null): mixed
public static function pull(string $name, mixed $default = null): mixed
{
return self::getInstance()->pull($name, $default);
}
Expand All @@ -151,7 +151,7 @@ public function pull(string $name, mixed $default = null): mixed
*
* @throws CookieException if headers already sent.
*/
public function remove(string $name): void
public static function remove(string $name): void
{
self::getInstance()->remove($name);
}
Expand All @@ -161,7 +161,7 @@ public function remove(string $name): void
*
* @throws CookieException if headers already sent.
*/
public function clear(): void
public static function clear(): void
{
self::getInstance()->clear();
}
Expand Down

0 comments on commit 07bdeff

Please sign in to comment.