You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sweep through the package and look into type hinting on the iterable pseudo-type instead of array, this would allow users of this package to be able to use arrays or instances of \Traversable in those scenarios. For example makeNew(array $items=[], bool $preserve_keys=true) will now become makeNew(iterable $items=[], bool $preserve_keys=true), thereby allowing users of this package to be able to create collections from iterables like Iterators, Generators, instances of ArrayObject etc.
Sweep through the package and look into type hinting on the iterable pseudo-type instead of array, this would allow users of this package to be able to use arrays or instances of \Traversable in those scenarios. For example makeNew(array $items=[], bool $preserve_keys=true) will now become makeNew(iterable $items=[], bool $preserve_keys=true), thereby allowing users of this package to be able to create collections from iterables like Iterators, Generators, instances of ArrayObject etc.
https://www.php.net/manual/en/language.types.iterable.php
https://www.php.net/manual/en/function.iterator-to-array.php
Look at using libraries like:
and search here: https://packagist.org/?query=iterable
The text was updated successfully, but these errors were encountered: