protected function findStepBySlug($slug = '') { /** @var array $steps */ $steps = $this->steps(); /** @var WizardStep $step */ foreach ($steps as $id => $step) { if ($step->getSlug() == $slug) { return $step; } } throw new StepNotFoundException(); }