Skip to content

Commit

Permalink
Refactor else statment
Browse files Browse the repository at this point in the history
  • Loading branch information
RhysLees committed Sep 24, 2022
1 parent a871238 commit f8a02ec
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/OnboardingSteps.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ public function addStep(string $title, string $model = null): OnboardingStep
$step = new OnboardingStep($title);

if ($model && new $model() instanceof Onboardable) {
$this->steps[$model][] = $step;
} else {
$this->steps['default'][] = $step;
return $this->steps[$model][] = $step;
}

return $step;
return $this->steps['default'][] = $step;
}

public function steps(Onboardable $model): Collection
Expand Down

0 comments on commit f8a02ec

Please sign in to comment.