1414namespace Josantonius \Cookie ;
1515
1616use DateTime ;
17- use Josantonius \Cookie \Exceptions \CookieException ;
1817use 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 {
0 commit comments