protected function getNextStep($currentStep) { $index = 1 + array_search($currentStep, $this->steps); if (isset($this->steps[$index])) { return $this->steps[$index]; } else { return null; } }