Skip to content

Commit

Permalink
Fixing doc blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed May 17, 2015
1 parent 663c965 commit cfd0cf3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/Collection/CollectionInterface.php
Expand Up @@ -483,7 +483,7 @@ public function sample($size = 10);
public function take($size = 1, $from = 0);

/**
* Returns a new collection that will the specified amount of elements.
* Returns a new collection that will skip the specified amount of elements
* at the beginning of the iteration.
*
* @param int $howMany The number of elements to skip.
Expand Down Expand Up @@ -540,7 +540,7 @@ public function first();
/**
* Returns the last result in this collection
*
* @return mixed The first value in the collection will be returned.
* @return mixed The last value in the collection will be returned.
*/
public function last();

Expand Down Expand Up @@ -874,7 +874,7 @@ public function zip($items);
*
* ```
* $collection = new Collection([1, 2]);
* $zipped = $collection->zip([3, 4], [5, 6], function () {
* $zipped = $collection->zipWith([3, 4], [5, 6], function () {
* return array_sum(func_get_args());
* });
* $zipped->toList(); // returns [9, 12]; [(1 + 3 + 5), (2 + 4 + 6)]
Expand Down
12 changes: 7 additions & 5 deletions src/Collection/Iterator/ZipIterator.php
Expand Up @@ -24,21 +24,23 @@
*
* ### Example
*
* {{{
* ```
* $iterator = new ZipIterator([[1, 2], [3, 4]]);
* $iterator->toList(); // Returns [[1, 3], [2, 4]]
* }}}
* ```
*
* You can also chose a custom function to zip the elements together, such
* as doing a sum by index:
*
* ### Example
* {{{
*
* ```
* $iterator = new ZipIterator([[1, 2], [3, 4]], function ($a, $b) {
* return $a + $b;
* });
* $iterator->toList(); // Returns [3, 6]
* }}}
* $iterator->toList(); // Returns [4, 6]
* ```
*
*/
class ZipIterator extends MultipleIterator implements CollectionInterface
{
Expand Down

0 comments on commit cfd0cf3

Please sign in to comment.