system = new System(); parent::__construct(); } protected function execute(InputInterface $input, OutputInterface $output): int { $this->setStyle($input, $output); $this->style->title('Loom Spinner'); if (!$this->system->isDockerEngineRunning()) { $this->style->error('It looks like the Docker Engine is not running. Please start it and try again.'); return Command::FAILURE; } return Command::SUCCESS; } protected function buildDockerComposeCommand(string $command, bool $withEnv = false, bool $daemon = true): string { return sprintf( 'cd %s && docker compose%s %s%s', $this->config->getDataDirectory(), $withEnv ? ' --env-file=' . $this->config->getDataDirectory() . '/.env' : '', $command, $daemon ? ' -d' : '' ); } private function setStyle(InputInterface $input, OutputInterface $output): void { $this->style = new SymfonyStyle($input, $output); } }