array_merge($carry, [ $setupStep(), ]), [], ); $allSuccess = array_reduce( $steps, fn(bool $carry, SetupStep $step) => !$carry ? false : $step->status === SetupStepStatus::SUCCESS, true, ); if ($allSuccess) { if ($this->accountService->countUsers() > 0) { return redirect( $this->channelService->channel->lucentUrl . "/login", ); } } return $this->svelte->render( layout: "account", view: "setup", title: "Setup Lucent", data: [ "steps" => $steps, "allSuccess" => $allSuccess, ], ); } }