Skip to content

Commit

Permalink
Simplify Factory Sequence counter (#37314)
Browse files Browse the repository at this point in the history
  • Loading branch information
iksaku authored May 10, 2021
1 parent 12b4a9e commit 68b1d3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/Factories/Sequence.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct(...$sequence)
*/
public function __invoke()
{
if ($this->index > ($this->count - 1)) {
if ($this->index >= $this->count) {
$this->index = 0;
}

Expand Down

0 comments on commit 68b1d3f

Please sign in to comment.