Skip to content

Commit

Permalink
Minor update on Collection class.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Aug 22, 2019
1 parent 8cfd4eb commit a543106
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public function proxy(string $method, $proxyMethod, ...$parameters): BaseCollect
*/
public static function range(int $start = 0, $end = \INF, $step = 1): BaseCollectionInterface
{
return (new Range($start, $end, $step))->run(static::empty());
return (new self())->run(new Range($start, $end, $step));
}

/**
Expand Down Expand Up @@ -345,7 +345,7 @@ static function () use ($number) {
}
);

return null === $callback ? $instance : (new Walk($callback))->run($instance);
return null === $callback ? $instance : static::with((new Run(new Walk($callback)))->run($instance));
}

/**
Expand Down

0 comments on commit a543106

Please sign in to comment.