diff --git a/Command/PopulateCommand.php b/Command/PopulateCommand.php index ac37cab..3f24a7f 100644 --- a/Command/PopulateCommand.php +++ b/Command/PopulateCommand.php @@ -130,8 +130,8 @@ class PopulateCommand extends ContainerAwareCommand $current = 0; return function ($increment, $totalObjects) use ($output, $index, $type, &$lastStep, &$current) { - if ($increment > $totalObjects) { - $increment = $totalObjects; + if ($current + $increment > $totalObjects) { + $increment = $totalObjects - $current; } $currentTime = microtime(true);