Skip to content

Commit e9ca5e5

Browse files
committed
refactor: sort namespaces
1 parent 17c05fa commit e9ca5e5

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

src/Cookie.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
namespace Josantonius\Cookie;
1515

1616
use DateTime;
17-
use Josantonius\Cookie\Exceptions\CookieException;
1817
use Throwable;
18+
use Josantonius\Cookie\Exceptions\CookieException;
1919

2020
/**
2121
* Cookie handler.
@@ -41,7 +41,7 @@ class Cookie
4141
* @see https://www.php.net/manual/en/datetime.formats.php
4242
* @see https://www.php.net/manual/en/function.setcookie.php
4343
*
44-
* @throws CookieException if $sameSite value is wrong.
44+
* @throws CookieException if $sameSite value is wrong
4545
*/
4646
public function __construct(
4747
private string $domain = '',
@@ -97,8 +97,8 @@ public function get(string $name, mixed $default = null): mixed
9797
*
9898
* @see https://www.php.net/manual/en/datetime.formats.php
9999
*
100-
* @throws CookieException if headers already sent.
101-
* @throws CookieException if failure in date/time string analysis.
100+
* @throws CookieException if headers already sent
101+
* @throws CookieException if failure in date/time string analysis
102102
*/
103103
public function set(string $name, mixed $value, null|int|string|DateTime $expires = null): void
104104
{
@@ -119,7 +119,7 @@ public function set(string $name, mixed $value, null|int|string|DateTime $expire
119119
*
120120
* @see https://www.php.net/manual/en/datetime.formats.php
121121
*
122-
* @throws CookieException if headers already sent.
122+
* @throws CookieException if headers already sent
123123
*/
124124
public function replace(array $data, null|int|string|DateTime $expires = null): void
125125
{
@@ -133,7 +133,7 @@ public function replace(array $data, null|int|string|DateTime $expires = null):
133133
*
134134
* Optionally defines a default value when the cookie does not exist.
135135
*
136-
* @throws CookieException if headers already sent.
136+
* @throws CookieException if headers already sent
137137
*/
138138
public function pull(string $name, mixed $default = null): mixed
139139
{
@@ -147,8 +147,8 @@ public function pull(string $name, mixed $default = null): mixed
147147
/**
148148
* Deletes a cookie by name.
149149
*
150-
* @throws CookieException if headers already sent.
151-
* @throws CookieException if failure in date/time string analysis.
150+
* @throws CookieException if headers already sent
151+
* @throws CookieException if failure in date/time string analysis
152152
*/
153153
public function remove(string $name): void
154154
{
@@ -160,7 +160,7 @@ public function remove(string $name): void
160160
/**
161161
* Deletes all cookies.
162162
*
163-
* @throws CookieException if headers already sent.
163+
* @throws CookieException if headers already sent
164164
*/
165165
public function clear(): void
166166
{
@@ -172,7 +172,7 @@ public function clear(): void
172172
/**
173173
* Gets cookie options.
174174
*
175-
* @throws CookieException if failure in date/time string analysis.
175+
* @throws CookieException if failure in date/time string analysis
176176
*/
177177
private function getOptions(null|int|string|DateTime $expires, bool $formatTime = true): array
178178
{
@@ -198,7 +198,7 @@ private function getOptions(null|int|string|DateTime $expires, bool $formatTime
198198
/**
199199
* Format the expiration time.
200200
*
201-
* @throws CookieException if failure in date/time string analysis.
201+
* @throws CookieException if failure in date/time string analysis
202202
*/
203203
private function formatExpirationTime(int|string|DateTime $expires): int
204204
{
@@ -218,7 +218,7 @@ private function formatExpirationTime(int|string|DateTime $expires): int
218218
/**
219219
* Throw exception if $sameSite value is wrong.
220220
*
221-
* @throws CookieException if $sameSite value is wrong.
221+
* @throws CookieException if $sameSite value is wrong
222222
*/
223223
private function failIfSameSiteValueIsWrong(): void
224224
{

src/Facades/Cookie.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private static function getInstance()
5050
* @see https://www.php.net/manual/en/datetime.formats.php
5151
* @see https://www.php.net/manual/en/function.setcookie.php
5252
*
53-
* @throws CookieException if $sameSite value is wrong.
53+
* @throws CookieException if $sameSite value is wrong
5454
*/
5555
public static function options(
5656
string $domain = '',
@@ -107,7 +107,7 @@ public function get(string $name, mixed $default = null): mixed
107107
*
108108
* @see https://www.php.net/manual/en/datetime.formats.php
109109
*
110-
* @throws CookieException if headers already sent.
110+
* @throws CookieException if headers already sent
111111
*/
112112
public function set(string $name, mixed $value, null|int|DateTime $expires = null): void
113113
{
@@ -126,7 +126,7 @@ public function set(string $name, mixed $value, null|int|DateTime $expires = nul
126126
*
127127
* @see https://www.php.net/manual/en/datetime.formats.php
128128
*
129-
* @throws CookieException if headers already sent.
129+
* @throws CookieException if headers already sent
130130
*/
131131
public function replace(array $data, null|int|DateTime $expires = null): void
132132
{
@@ -138,7 +138,7 @@ public function replace(array $data, null|int|DateTime $expires = null): void
138138
*
139139
* Optionally defines a default value when the cookie does not exist.
140140
*
141-
* @throws CookieException if headers already sent.
141+
* @throws CookieException if headers already sent
142142
*/
143143
public function pull(string $name, mixed $default = null): mixed
144144
{
@@ -148,7 +148,7 @@ public function pull(string $name, mixed $default = null): mixed
148148
/**
149149
* Deletes a cookie by name.
150150
*
151-
* @throws CookieException if headers already sent.
151+
* @throws CookieException if headers already sent
152152
*/
153153
public function remove(string $name): void
154154
{
@@ -158,7 +158,7 @@ public function remove(string $name): void
158158
/**
159159
* Deletes all cookies.
160160
*
161-
* @throws CookieException if headers already sent.
161+
* @throws CookieException if headers already sent
162162
*/
163163
public function clear(): void
164164
{

0 commit comments

Comments
 (0)