public function isLast($stepId = null) { $i = $this->stepIndex($stepId == null ? $this->currentStep->getId() : $stepId); return $i == count($this->steps()) - 1; }