Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ds): narrow toArray() return type #1704

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions ds/ds.php
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ public function isEmpty(): bool {}
* Converts the collection to an array.
* <p><b>Note:</b> Casting to an array is not supported yet.</p>
* @link https://www.php.net/manual/en/ds-vector.toarray.php
* @return array<TValue> An array containing all the values in the same order as
* @return list<TValue> An array containing all the values in the same order as
* the collection.
*/
public function toArray(): array {}
Expand Down Expand Up @@ -890,7 +890,7 @@ public function isEmpty(): bool {}
* Converts the deque to an array.
* <p><b>Note:</b> Casting to an array is not supported yet.</p>
* @link https://www.php.net/manual/en/ds-deque.toarray.php
* @return array<TValue> An array containing all the values in the same order as
* @return list<TValue> An array containing all the values in the same order as
* the deque.
*/
public function toArray(): array {}
Expand Down Expand Up @@ -1418,7 +1418,7 @@ public function isEmpty(): bool {}
* </p>
*
* @link https://www.php.net/manual/en/ds-map.toarray.php
* @return array<TValue> An array containing all the values in the same order as
* @return array<TKey, TValue> An array containing all the values in the same order as
* the map.
*/
public function toArray(): array {}
Expand Down Expand Up @@ -2267,7 +2267,7 @@ public function xor(Set $set): Set {}
* Converts the set to an array.
* <p><b>Note:</b> Casting to an array is not supported yet.</p>
* @link https://www.php.net/manual/en/ds-set.toarray.php
* @return array<TValue> An array containing all the values in the same order as
* @return list<TValue> An array containing all the values in the same order as
* the collection.
*/
public function toArray(): array {}
Expand Down Expand Up @@ -2392,7 +2392,7 @@ public function isEmpty(): bool {}
* Converts the collection to an array.
* <p><b>Note:</b> Casting to an array is not supported yet.</p>
* @link https://www.php.net/manual/en/ds-stack.toarray.php
* @return array<TValue> An array containing all the values in the same order as
* @return list<TValue> An array containing all the values in the same order as
* the collection.
*/
public function toArray(): array {}
Expand Down Expand Up @@ -2548,7 +2548,7 @@ public function isEmpty(): bool {}
* Converts the collection to an array.
* <p><b>Note:</b> Casting to an array is not supported yet.</p>
* @link https://www.php.net/manual/en/ds-queue.toarray.php
* @return array<TValue> An array containing all the values in the same order as
* @return list<TValue> An array containing all the values in the same order as
* the collection.
*/
public function toArray(): array {}
Expand Down Expand Up @@ -2716,7 +2716,7 @@ public function push($value, int $priority) {}
* Converts the collection to an array.
* <p><b>Note:</b> Casting to an array is not supported yet.</p>
* @link https://www.php.net/manual/en/ds-collection.toarray.php
* @return array<TValue> An array containing all the values in the same order as
* @return list<TValue> An array containing all the values in the same order as
* the collection.
*/
public function toArray(): array {}
Expand Down
Loading