@@ -40,6 +40,9 @@ |
||
| 40 | 40 | return $iterator->current(); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | + /** |
|
| 44 | + * @return string |
|
| 45 | + */ |
|
| 43 | 46 | public static function reduce(\Traversable $iterator, callable $callback, $initial = null) |
| 44 | 47 | { |
| 45 | 48 | $callback = \Closure::fromCallable($callback); |
@@ -12,6 +12,9 @@ |
||
| 12 | 12 | parent::__construct($this->getShuffledIterator($iterator)); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | + /** |
|
| 16 | + * @param \Traversable $iterator |
|
| 17 | + */ |
|
| 15 | 18 | public function getShuffledIterator($iterator) |
| 16 | 19 | { |
| 17 | 20 | $sortedIterator = new \ArrayIterator(); |