Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tdashton committed Nov 15, 2024
1 parent f92e273 commit 3f78ea5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/collection-interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ $collection->add($item1)->add($item2);
### chunk

```php
/** @return self[]|static[] */
public function chunk(int $size): array
/** @return self[]|static[] */
public function chunk(int $size): array
```

This method [mirrors the behavior of `array_chunk`](https://www.php.net/manual/function.array-chunk.php) and returns a zero indexed numeric array of the current Collection based on the chunk size provided.
Expand Down
4 changes: 2 additions & 2 deletions docs/collection-trait.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ $collection->toArray();

Internally it is call the `ArrayIterator::append` and returning the instance to allow fluent calls.

### chunk
## chunk

This method [mirrors the behavior of `array_chunk`](https://www.php.net/manual/function.array-chunk.php) and returns a zero indexed numeric array of the current Collection based on the chunk size provided.

Expand All @@ -121,7 +121,7 @@ Finally, it will return the duplicated collection, optionally calling the `uniqu

Internally, this method will iterate through each item of a collection, optionally rewind it at the end of the iteration, calling the anonymous function for each element.

### eachChunk
## eachChunk

This method chunks the collection and executes the given anonymous function with each chunk.

Expand Down

0 comments on commit 3f78ea5

Please sign in to comment.