Skip to content

Commit 67dc40e

Browse files
committed
docs: replace type mixed in Cookie class.
1 parent f32eaa5 commit 67dc40e

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

system/Cookie/Cookie.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class Cookie implements ArrayAccess, CloneableCookieInterface
9696
* Default attributes for a Cookie object. The keys here are the
9797
* lowercase attribute names. Do not camelCase!
9898
*
99-
* @var array<string, mixed>
99+
* @var array<string,bool|int|object|string>
100100
*/
101101
private static array $defaults = [
102102
'prefix' => '',
@@ -124,9 +124,9 @@ class Cookie implements ArrayAccess, CloneableCookieInterface
124124
*
125125
* This method is called from Response::__construct().
126126
*
127-
* @param array<string, mixed>|CookieConfig $config
127+
* @param array<string,bool|int|object|string>|CookieConfig $config
128128
*
129-
* @return array<string, mixed> The old defaults array. Useful for resetting.
129+
* @return array<string,bool|int|object|string> The old defaults array. Useful for resetting.
130130
*/
131131
public static function setDefaults($config = [])
132132
{
@@ -195,9 +195,9 @@ public static function fromHeaderString(string $cookie, bool $raw = false)
195195
/**
196196
* Construct a new Cookie instance.
197197
*
198-
* @param string $name The cookie's name
199-
* @param string $value The cookie's value
200-
* @param array<string, mixed> $options The cookie's options
198+
* @param string $name The cookie's name
199+
* @param string $value The cookie's value
200+
* @param array<string,bool|int|object|string> $options The cookie's options
201201
*
202202
* @throws CookieException
203203
*/
@@ -595,8 +595,8 @@ public function offsetGet($offset)
595595
/**
596596
* Offset to set.
597597
*
598-
* @param string $offset
599-
* @param mixed $value
598+
* @param string $offset
599+
* @param array|bool|float|int|object|string|null $value
600600
*
601601
* @throws LogicException
602602
*/

system/Cookie/CookieInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function isRaw(): bool;
143143
* Gets the options that are passable to the `setcookie` variant
144144
* available on PHP 7.3+
145145
*
146-
* @return array<string, mixed>
146+
* @return array<string,bool|int|object|string>
147147
*/
148148
public function getOptions(): array;
149149

@@ -162,7 +162,7 @@ public function __toString();
162162
/**
163163
* Returns the array representation of the Cookie object.
164164
*
165-
* @return array<string, mixed>
165+
* @return array<string,bool|int|object|string>
166166
*/
167167
public function toArray(): array;
168168
}

tests/system/Cookie/CookieTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function testExpirationTime(): void
168168
/**
169169
* @dataProvider invalidExpiresProvider
170170
*
171-
* @param mixed $expires
171+
* @param int|object $expires
172172
*/
173173
public function testInvalidExpires($expires): void
174174
{

0 commit comments

Comments
 (0)