Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 29, 2016
1 parent 4a54faf commit 1b021f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Eloquent/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public function value($column)
*
* @param int $count
* @param callable $callback
* @return bool
* @return bool
*/
public function chunk($count, callable $callback)
{
Expand Down Expand Up @@ -360,13 +360,13 @@ public function chunk($count, callable $callback)
* @param int $count
* @param callable $callback
* @param string $column
* @return bool
* @return bool
*/
public function chunkById($count, callable $callback, $column = 'id')
{
$lastId = null;

$results = $this->pageAfterId($count, 0, $column)->get();
$results = $this->forPageAfterId($count, 0, $column)->get();

while (! $results->isEmpty()) {
if (call_user_func($callback, $results) === false) {
Expand All @@ -375,7 +375,7 @@ public function chunkById($count, callable $callback, $column = 'id')

$lastId = $results->last()->{$column};

$results = $this->pageAfterId($count, $lastId, $column)->get();
$results = $this->forPageAfterId($count, $lastId, $column)->get();
}

return true;
Expand Down
10 changes: 5 additions & 5 deletions Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1338,9 +1338,9 @@ public function forPage($page, $perPage = 15)
* @param int $perPage
* @param int $lastId
* @param string $column
* @return \Illuminate\Database\Query\Builder|static
* @return \Illuminate\Database\Query\Builder|static
*/
public function pageAfterId($perPage = 15, $lastId = 0, $column = 'id')
public function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id')
{
return $this->select($column)
->where($column, '>', $lastId)
Expand Down Expand Up @@ -1651,13 +1651,13 @@ public function chunk($count, callable $callback)
* @param int $count
* @param callable $callback
* @param string $column
* @return bool
* @return bool
*/
public function chunkById($count, callable $callback, $column = 'id')
{
$lastId = null;

$results = $this->pageAfterId($count, 0, $column)->get();
$results = $this->forPageAfterId($count, 0, $column)->get();

while (! empty($results)) {
if (call_user_func($callback, $results) === false) {
Expand All @@ -1666,7 +1666,7 @@ public function chunkById($count, callable $callback, $column = 'id')

$lastId = last($results)->{$column};

$results = $this->pageAfterId($count, $lastId, $column)->get();
$results = $this->forPageAfterId($count, $lastId, $column)->get();
}

return true;
Expand Down

0 comments on commit 1b021f6

Please sign in to comment.