self::Completed, OnboardingLifecycleState::Cancelled => self::Cancelled, default => self::Draft, }; } public function label(): string { return match ($this) { self::Draft => 'Draft', self::Completed => 'Completed', self::Cancelled => 'Cancelled', }; } public function isResumable(): bool { return $this === self::Draft; } public function isTerminal(): bool { return ! $this->isResumable(); } }