Skip to content

Commit

Permalink
Update docs for new iterators
Browse files Browse the repository at this point in the history
Mark them as internal as they are internal implementation details of the
Collection class, and fix some typos.
  • Loading branch information
markstory committed Dec 19, 2014
1 parent 5fe3e34 commit 66b3c46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/Collection/Iterator/StoppableIterator.php
Expand Up @@ -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 {

Expand All @@ -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.
*/
Expand All @@ -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
*/
Expand Down
5 changes: 4 additions & 1 deletion src/Collection/Iterator/UnfoldIterator.php
Expand Up @@ -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 {

Expand All @@ -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
Expand Down

0 comments on commit 66b3c46

Please sign in to comment.