From 11d693ce1cf3b867aa8d34372b7298da2c16abb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pluchino?= Date: Sat, 7 Aug 2021 16:42:22 +0200 Subject: [PATCH] Update code style --- src/Command/ConfigCommand.php | 5 ++++- src/Compiler.php | 2 +- src/Console/Application.php | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Command/ConfigCommand.php b/src/Command/ConfigCommand.php index 945e810..5960d9f 100644 --- a/src/Command/ConfigCommand.php +++ b/src/Command/ConfigCommand.php @@ -129,7 +129,7 @@ protected function initialize(InputInterface $input, OutputInterface $output): v $uniqueKey = GitUtil::getUniqueKey(); if (null === $uniqueKey) { - throw new \RuntimeException(sprintf('The working directory is not managed by GIT')); + throw new \RuntimeException('The working directory is not managed by GIT'); } $configFile = sprintf('%s/%s.json', $this->config->get('data-dir'), $uniqueKey); @@ -201,6 +201,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int } break; + case 'lib': case 'library': case 'libraries': @@ -215,6 +216,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int } break; + case 'bin': case 'binary': case 'binaries': @@ -229,6 +231,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int } break; + default: if (!\array_key_exists($settingKey, Config::$defaultConfig)) { throw new RuntimeException(sprintf('The "%s" setting key does not exist', $settingKey)); diff --git a/src/Compiler.php b/src/Compiler.php index 5a189fb..f6398b4 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -268,7 +268,7 @@ private function getStub(): string $stub = <<<'EOF' #!/usr/bin/env php releaser = Factory::create($this->io, $this->configFile, $this->initialWorkingDirectory); } catch (\Throwable $e) { $this->io->writeError($e->getMessage()); + exit(1); } }