From 99046fc9d1662efd8989183d24b6d07eb872f2bb Mon Sep 17 00:00:00 2001
From: Simon Podlipsky <simon@podlipsky.net>
Date: Mon, 16 Dec 2024 15:56:11 +0100
Subject: [PATCH] feat(ds): narrow `toArray()` return type

---
 ds/ds.php | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/ds/ds.php b/ds/ds.php
index a303a0dec..cafa34d19 100644
--- a/ds/ds.php
+++ b/ds/ds.php
@@ -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 {}
@@ -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 {}
@@ -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 {}
@@ -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 {}
@@ -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 {}
@@ -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 {}
@@ -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 {}