@@ -166,8 +166,12 @@ public function askByMultipleKeys(string $text, array $options): array
166166 /**
167167 * Lets the user pick one option with the arrow keys and returns its key, asking for its number where keys cannot be read.
168168 *
169- * @param array<array-key, string> $options
170- * @param int|string|null $default The key highlighted at the start, or `null` for the first one
169+ * @template TKey of array-key
170+ *
171+ * @param array<TKey, string> $options
172+ * @param TKey|null $default The key highlighted at the start, or `null` for the first one
173+ *
174+ * @return TKey
171175 *
172176 * @throws InvalidArgumentException
173177 */
@@ -209,10 +213,12 @@ public function select(string $question, array $options, int|string|null $defaul
209213 /**
210214 * Lets the user tick options with the arrow keys and the space bar, asking for their numbers where keys cannot be read.
211215 *
212- * @param array<array-key, string> $options
213- * @param list<array-key> $default The keys ticked at the start
216+ * @template TKey of array-key
217+ *
218+ * @param array<TKey, string> $options
219+ * @param list<TKey> $default The keys ticked at the start
214220 *
215- * @return array<array-key , string> The ticked options, in the order of `$options`
221+ * @return array<TKey , string> The ticked options, in the order of `$options`
216222 *
217223 * @throws CLIException When a required answer has no default on an output that cannot ask
218224 * @throws InvalidArgumentException
0 commit comments