limit = 1; $this->totalSteps = $pages->count(); foreach ($pages as $page) { $this->currentStep++; $task->run(); } $this->isComplete = true; return; } }