diff --git a/src/Console/Command/Theme/BuildCommand.php b/src/Console/Command/Theme/BuildCommand.php index acb7015..f70e506 100644 --- a/src/Console/Command/Theme/BuildCommand.php +++ b/src/Console/Command/Theme/BuildCommand.php @@ -70,7 +70,7 @@ protected function executeCommand(InputInterface $input, OutputInterface $output if (empty($themeCodes)) { $themes = $this->themeList->getAllThemes(); - $options = array_map(fn($theme) => $theme->getCode(), $themes); + $options = array_values(array_map(fn($theme) => $theme->getCode(), $themes)); // Check if we're in an interactive terminal environment if (!$this->isInteractiveTerminal($output)) { diff --git a/src/Console/Command/Theme/CleanCommand.php b/src/Console/Command/Theme/CleanCommand.php index a5e80ae..3bc29d9 100644 --- a/src/Console/Command/Theme/CleanCommand.php +++ b/src/Console/Command/Theme/CleanCommand.php @@ -141,7 +141,7 @@ private function getAllThemeCodes(): ?array private function selectThemesInteractively(OutputInterface $output): ?array { $themes = $this->themeList->getAllThemes(); - $options = array_map(fn($theme) => $theme->getCode(), $themes); + $options = array_values(array_map(fn($theme) => $theme->getCode(), $themes)); if (!$this->isInteractiveTerminal($output)) { $this->displayAvailableThemes($themes); diff --git a/src/Console/Command/Theme/TokensCommand.php b/src/Console/Command/Theme/TokensCommand.php index d8e6e52..f97684a 100644 --- a/src/Console/Command/Theme/TokensCommand.php +++ b/src/Console/Command/Theme/TokensCommand.php @@ -106,7 +106,7 @@ private function selectTheme(?string $themeCode): ?string } $themes = $this->themeList->getAllThemes(); - $options = array_map(fn($theme) => $theme->getCode(), $themes); + $options = array_values(array_map(fn($theme) => $theme->getCode(), $themes)); $themeCodePrompt = new SearchPrompt( label: 'Select theme to generate tokens for',