1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-24 18:13:00 +01:00

Merge pull request #415 from hakre/patch-1

FilterIterator expects Iterator not Traversable
This commit is contained in:
Michael Dowling 2013-09-08 11:32:00 -07:00
commit 0be702d382

View File

@ -15,12 +15,12 @@ class FilterIterator extends \FilterIterator
protected $callback;
/**
* @param \Traversable $iterator Traversable iterator
* @param \Iterator $iterator Traversable iterator
* @param array|\Closure $callback Callback used for filtering. Return true to keep or false to filter.
*
* @throws InvalidArgumentException if the callback if not callable
*/
public function __construct(\Traversable $iterator, $callback)
public function __construct(\Iterator $iterator, $callback)
{
parent::__construct($iterator);
if (!is_callable($callback)) {