Skip to content

Commit a62a512

Browse files
committed
refactor: simplify theme options retrieval in ThemeWatchCommand
1 parent 91dcc92 commit a62a512

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Console/Command/ThemeWatchCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
4444

4545
if (empty($themeCode)) {
4646
$themes = $this->themeList->getAllThemes();
47-
$options = array_map(fn($theme) => $theme->getCode(), $themes);
48-
47+
$options = [];
48+
foreach ($themes as $theme) {
49+
$options[] = $theme->getCode();
50+
}
4951

5052
$themeCodePrompt = new SelectPrompt(
5153
label: 'Select theme to watch',

0 commit comments

Comments
 (0)