From 66b3c46090fbe6040252b5106ab6ce6514199d26 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Thu, 18 Dec 2014 22:17:44 -0500 Subject: [PATCH] Update docs for new iterators Mark them as internal as they are internal implementation details of the Collection class, and fix some typos. --- src/Collection/Iterator/StoppableIterator.php | 7 +++++-- src/Collection/Iterator/UnfoldIterator.php | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Collection/Iterator/StoppableIterator.php b/src/Collection/Iterator/StoppableIterator.php index ca6e64386e7..eb8f61b600a 100644 --- a/src/Collection/Iterator/StoppableIterator.php +++ b/src/Collection/Iterator/StoppableIterator.php @@ -20,6 +20,9 @@ * Creates an iterator from another iterator that will verify a condition on each * step. If the condition evaluates to false, the iterator will not yield more * results. + * + * @internal + * @see Collection::stopWhen() */ class StoppableIterator extends Collection { @@ -38,7 +41,7 @@ class StoppableIterator extends Collection { * as arguments, in that order. * * @param array|\Traversable $items The list of values to iterate - * @param callable $condition A function that will be called for ech item in + * @param callable $condition A function that will be called for each item in * the collection, if the result evaluates to false, no more items will be * yielded from this iterator. */ @@ -49,7 +52,7 @@ public function __construct($items, callable $condition) { /** * Evaluates the condition and returns its result, this controls - * whther or not more results are yielded + * whether or not more results will be yielded. * * @return bool */ diff --git a/src/Collection/Iterator/UnfoldIterator.php b/src/Collection/Iterator/UnfoldIterator.php index d44e8b3d895..948834e2b93 100644 --- a/src/Collection/Iterator/UnfoldIterator.php +++ b/src/Collection/Iterator/UnfoldIterator.php @@ -21,6 +21,9 @@ /** * An iterator that can be used to generate nested iterators out of each of * applying an function to each of the elements in this iterator. + * + * @internal + * @see Collection::unfold() */ class UnfoldIterator extends IteratorIterator implements RecursiveIterator { @@ -33,7 +36,7 @@ class UnfoldIterator extends IteratorIterator implements RecursiveIterator { protected $_unfolder; /** - * Creates the iterator that will genere children iterators out of each of the + * Creates the iterator that will generate child iterators from each of the * elements it was constructed with. * * @param array|\Traversable $items The list of values to iterate