@@ -44,17 +44,17 @@ public function name(?string $name): self
4444 }
4545
4646 /**
47- * @psalm-param \Stringable|scalar|null ...$value One or more string values.
47+ * @psalm-param \Stringable|scalar ...$value One or more string values.
4848 */
4949 public function value (...$ value ): self
5050 {
5151 $ new = clone $ this ;
52- $ new ->values = array_map ('\strval ' , $ value );
52+ $ new ->values = array_map ('\strval ' , array_values ( $ value) );
5353 return $ new ;
5454 }
5555
5656 /**
57- * @psalm-param iterable<array-key , \Stringable|scalar|null > $values A set of values.
57+ * @psalm-param iterable<int , \Stringable|scalar> $values A set of values.
5858 */
5959 public function values ($ values ): self
6060 {
@@ -63,7 +63,7 @@ public function values($values): self
6363 throw new InvalidArgumentException ('$values should be iterable. ' );
6464 }
6565
66- /** @psalm-var iterable<array-key , \Stringable|scalar|null > $values */
66+ /** @psalm-var iterable<int , \Stringable|scalar> $values */
6767 $ values = is_array ($ values ) ? $ values : iterator_to_array ($ values );
6868
6969 return $ this ->value (...$ values );
@@ -221,8 +221,6 @@ protected function generateContent(): string
221221 array_unshift ($ items , $ this ->prompt );
222222 }
223223
224- /** @var Optgroup[]|Option[] $items */
225-
226224 $ items = array_map (function ($ item ) {
227225 if ($ item instanceof Option) {
228226 return $ item ->selected (in_array ($ item ->getValue (), $ this ->values , true ));
0 commit comments