Skip to content

Commit

Permalink
Return collection instead of array in the partition method.
Browse files Browse the repository at this point in the history
  • Loading branch information
sileence committed Dec 5, 2016
1 parent 6cc3068 commit 8c3c3b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Support/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -729,11 +729,11 @@ public function forPage($page, $perPage)
* Partition the collection into two arrays using the given callback or key.
*
* @param callable|string $callback
* @return array
* @return static
*/
public function partition($callback)
{
$partitions = [new static(), new static()];
$partitions = new static([new static(), new static()]);

$callback = $this->valueRetriever($callback);

Expand Down

0 comments on commit 8c3c3b6

Please sign in to comment.