@@ -99,7 +99,16 @@ class Cookie implements ArrayAccess, CloneableCookieInterface
9999 * Default attributes for a Cookie object. The keys here are the
100100 * lowercase attribute names. Do not camelCase!
101101 *
102- * @var array<string, bool|int|string>
102+ * @var array{
103+ * prefix: string,
104+ * expires: int,
105+ * path: string,
106+ * domain: string,
107+ * secure: bool,
108+ * httponly: bool,
109+ * samesite: string,
110+ * raw: bool,
111+ * }
103112 */
104113 private static array $ defaults = [
105114 'prefix ' => '' ,
@@ -127,9 +136,27 @@ class Cookie implements ArrayAccess, CloneableCookieInterface
127136 *
128137 * This method is called from Response::__construct().
129138 *
130- * @param array<string, bool|int|string>|CookieConfig $config
139+ * @param array{
140+ * prefix?: string,
141+ * expires?: int,
142+ * path?: string,
143+ * domain?: string,
144+ * secure?: bool,
145+ * httponly?: bool,
146+ * samesite?: string,
147+ * raw?: bool,
148+ * }|CookieConfig $config
131149 *
132- * @return array<string, mixed> The old defaults array. Useful for resetting.
150+ * @return array{
151+ * prefix: string,
152+ * expires: int,
153+ * path: string,
154+ * domain: string,
155+ * secure: bool,
156+ * httponly: bool,
157+ * samesite: string,
158+ * raw: bool,
159+ * } The old defaults array. Useful for resetting.
133160 */
134161 public static function setDefaults ($ config = [])
135162 {
@@ -198,9 +225,9 @@ public static function fromHeaderString(string $cookie, bool $raw = false)
198225 /**
199226 * Construct a new Cookie instance.
200227 *
201- * @param string $name The cookie's name
202- * @param string $value The cookie's value
203- * @param array< string, bool| int|string> $options The cookie's options
228+ * @param string $name The cookie's name
229+ * @param string $value The cookie's value
230+ * @param array{prefix?: string, max-age?: int|numeric-string, expires?: DateTimeInterface| int|string, path?: string, domain?: string, secure?: bool, httponly?: bool, samesite?: string, raw?: bool} $options The cookie's options
204231 *
205232 * @throws CookieException
206233 */
0 commit comments