Skip to content

Commit

Permalink
[11.x] Fix the chunk method to an integer type in the splitIn method (#…
Browse files Browse the repository at this point in the history
…51733)

Co-authored-by: 10470 <xiexuekun@addcn.com>
  • Loading branch information
rookiexxk and 10470 authored Jun 7, 2024
1 parent 2e20164 commit b3db6b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Collections/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ public function split($numberOfGroups)
*/
public function splitIn($numberOfGroups)
{
return $this->chunk(ceil($this->count() / $numberOfGroups));
return $this->chunk((int) ceil($this->count() / $numberOfGroups));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Collections/LazyCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,7 @@ public function chunk($size)
*/
public function splitIn($numberOfGroups)
{
return $this->chunk(ceil($this->count() / $numberOfGroups));
return $this->chunk((int) ceil($this->count() / $numberOfGroups));
}

/**
Expand Down

0 comments on commit b3db6b6

Please sign in to comment.