Skip to content

Commit 7b3e19b

Browse files
authored
Chore: Add types to iterable_to_traversable() (#29)
1 parent 8d61a26 commit 7b3e19b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/iterable-functions.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ function iterable_to_array(iterable $iterable, bool $preserveKeys = true): array
5151
/**
5252
* If the iterable is not instance of Traversable, it is an array => convert it to an ArrayIterator.
5353
*
54-
* @param iterable<mixed> $iterable
54+
* @param iterable<TKey, TValue> $iterable
55+
*
56+
* @return Traversable<TKey, TValue>
5557
*
56-
* @return Traversable<mixed>
58+
* @template TKey
59+
* @template TValue
5760
*/
5861
function iterable_to_traversable(iterable $iterable): Traversable
5962
{

0 commit comments

Comments
 (0)