Skip to content

Commit

Permalink
Refactor ListThemesCommand: remove unused constructor and improve cod…
Browse files Browse the repository at this point in the history
…e clarity
  • Loading branch information
dermatz committed Dec 13, 2024
1 parent 14aa561 commit 07c9c5c
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions src/Console/Command/ListThemesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,21 @@

class ListThemesCommand extends Command
{
/**
* Constructor
*
* @param ThemeList $themeList
*/
public function __construct(
private readonly ThemeList $themeList,
) {
parent::__construct();
}

/**
* Configure the command
*/
protected function configure(): void {
protected function configure(): void
{
$this->setName('mageforge:themes:list');
$this->setDescription('Lists all available themes');
}

/**
* Execute the command
*
* @param InputInterface $input
* @param OutputInterface $output
* @return int
*/
protected function execute(
InputInterface $input,
OutputInterface $output
OutputInterface $output,
): int {
$themes = $this->themeList->getAllThemes();

Expand Down

0 comments on commit 07c9c5c

Please sign in to comment.