nikic / iter

Iteration primitives using generators
Other
1.12k stars 76 forks source link

Add typehints #77

Closed SamMousa closed 5 years ago

SamMousa commented 5 years ago

Since PHP7.1, which is required in composer.json the iterable type hint is supported.

Would you:

  1. Accept a PR that makes the parameters to functions that take iterables typed.

Or, if not 1:

  1. Accept a PR that adds iterable as an option in the PHPDoc (since array|Traversable does not include iterable).

?

jvasseur commented 5 years ago

The master branch (which is the one that requires PHP 7.1) already has iterable type hints where possible (it was done in https://github.com/nikic/iter/pull/52), it's just not released yet.