diff --git a/src/Command/Build.php b/src/Command/Build.php index cc2e50c7a..9d2442dcf 100644 --- a/src/Command/Build.php +++ b/src/Command/Build.php @@ -34,20 +34,18 @@ protected function configure() $this ->setName('build') ->setDescription('Builds the website') - ->setDefinition( - new InputDefinition([ - new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), - new InputOption('config', 'c', InputOption::VALUE_REQUIRED, 'Set the path to extra config files (comma-separated)'), - new InputOption('drafts', 'd', InputOption::VALUE_NONE, 'Include drafts'), - new InputOption('page', 'p', InputOption::VALUE_REQUIRED, 'Build a specific page'), - new InputOption('dry-run', null, InputOption::VALUE_NONE, 'Build without saving'), - new InputOption('baseurl', null, InputOption::VALUE_REQUIRED, 'Set the base URL'), - new InputOption('output', null, InputOption::VALUE_REQUIRED, 'Set the output directory'), - new InputOption('optimize', null, InputOption::VALUE_OPTIONAL, 'Optimize files (disable with "no")', false), - new InputOption('clear-cache', null, InputOption::VALUE_OPTIONAL, 'Clear cache before build (optional cache key regular expression)', false), - new InputOption('show-pages', null, InputOption::VALUE_NONE, 'Show built pages as table'), - ]) - ) + ->setDefinition([ + new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), + new InputOption('config', 'c', InputOption::VALUE_REQUIRED, 'Set the path to extra config files (comma-separated)'), + new InputOption('drafts', 'd', InputOption::VALUE_NONE, 'Include drafts'), + new InputOption('page', 'p', InputOption::VALUE_REQUIRED, 'Build a specific page'), + new InputOption('dry-run', null, InputOption::VALUE_NONE, 'Build without saving'), + new InputOption('baseurl', null, InputOption::VALUE_REQUIRED, 'Set the base URL'), + new InputOption('output', null, InputOption::VALUE_REQUIRED, 'Set the output directory'), + new InputOption('optimize', null, InputOption::VALUE_OPTIONAL, 'Optimize files (disable with "no")', false), + new InputOption('clear-cache', null, InputOption::VALUE_OPTIONAL, 'Clear cache before build (optional cache key regular expression)', false), + new InputOption('show-pages', null, InputOption::VALUE_NONE, 'Show built pages as table'), + ]) ->setHelp('Builds the website in the output directory'); } diff --git a/src/Command/CacheClear.php b/src/Command/CacheClear.php index 6f2af52f8..466fb7a6e 100644 --- a/src/Command/CacheClear.php +++ b/src/Command/CacheClear.php @@ -32,11 +32,9 @@ protected function configure() $this ->setName('cache:clear') ->setDescription('Removes all caches') - ->setDefinition( - new InputDefinition([ - new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), - ]) - ) + ->setDefinition([ + new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), + ]) ->setHelp('Removes all cached files'); } diff --git a/src/Command/CacheClearAssets.php b/src/Command/CacheClearAssets.php index 1db88f1b4..34da64140 100644 --- a/src/Command/CacheClearAssets.php +++ b/src/Command/CacheClearAssets.php @@ -32,11 +32,9 @@ protected function configure() $this ->setName('cache:clear:assets') ->setDescription('Removes assets cache') - ->setDefinition( - new InputDefinition([ - new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), - ]) - ) + ->setDefinition([ + new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), + ]) ->setHelp('Removes cached assets files'); } diff --git a/src/Command/CacheClearTemplates.php b/src/Command/CacheClearTemplates.php index 5922360c8..e49f3f2b2 100644 --- a/src/Command/CacheClearTemplates.php +++ b/src/Command/CacheClearTemplates.php @@ -32,11 +32,9 @@ protected function configure() $this ->setName('cache:clear:templates') ->setDescription('Removes templates cache') - ->setDefinition( - new InputDefinition([ - new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), - ]) - ) + ->setDefinition([ + new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), + ]) ->setHelp('Removes cached templates files'); } diff --git a/src/Command/CacheClearTranslations.php b/src/Command/CacheClearTranslations.php index 6ea315257..69ff41f75 100644 --- a/src/Command/CacheClearTranslations.php +++ b/src/Command/CacheClearTranslations.php @@ -32,11 +32,9 @@ protected function configure() $this ->setName('cache:clear:translations') ->setDescription('Removes translations cache') - ->setDefinition( - new InputDefinition([ - new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), - ]) - ) + ->setDefinition([ + new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), + ]) ->setHelp('Removes cached translations files'); } diff --git a/src/Command/Clear.php b/src/Command/Clear.php index 4aafcecfe..80d2af69e 100644 --- a/src/Command/Clear.php +++ b/src/Command/Clear.php @@ -32,11 +32,9 @@ protected function configure() $this ->setName('clear') ->setDescription('Removes generated files') - ->setDefinition( - new InputDefinition([ - new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), - ]) - ) + ->setDefinition([ + new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), + ]) ->setHelp('Removes generated, temporary and cache files'); } diff --git a/src/Command/NewPage.php b/src/Command/NewPage.php index 16f12f27b..3b1063075 100644 --- a/src/Command/NewPage.php +++ b/src/Command/NewPage.php @@ -34,16 +34,14 @@ protected function configure() $this ->setName('new:page') ->setDescription('Creates a new page') - ->setDefinition( - new InputDefinition([ - new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), - new InputOption('name', null, InputOption::VALUE_REQUIRED, 'Page path name'), - new InputOption('prefix', 'p', InputOption::VALUE_NONE, 'Prefix the file name with the current date (`YYYY-MM-DD`)'), - new InputOption('force', 'f', InputOption::VALUE_NONE, 'Override the file if already exist'), - new InputOption('open', 'o', InputOption::VALUE_NONE, 'Open editor automatically'), - new InputOption('editor', null, InputOption::VALUE_REQUIRED, 'Editor to use with open option'), - ]) - ) + ->setDefinition([ + new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), + new InputOption('name', null, InputOption::VALUE_REQUIRED, 'Page path name'), + new InputOption('prefix', 'p', InputOption::VALUE_NONE, 'Prefix the file name with the current date (`YYYY-MM-DD`)'), + new InputOption('force', 'f', InputOption::VALUE_NONE, 'Override the file if already exist'), + new InputOption('open', 'o', InputOption::VALUE_NONE, 'Open editor automatically'), + new InputOption('editor', null, InputOption::VALUE_REQUIRED, 'Editor to use with open option'), + ]) ->setHelp('Creates a new page file (with filename as title)'); } diff --git a/src/Command/NewSite.php b/src/Command/NewSite.php index e669d956a..071997c1c 100644 --- a/src/Command/NewSite.php +++ b/src/Command/NewSite.php @@ -35,13 +35,11 @@ protected function configure() $this ->setName('new:site') ->setDescription('Creates a new website') - ->setDefinition( - new InputDefinition([ - new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), - new InputOption('force', 'f', InputOption::VALUE_NONE, 'Override directory if it already exists'), - new InputOption('demo', null, InputOption::VALUE_NONE, 'Add demo content (pages, templates and assets)'), - ]) - ) + ->setDefinition([ + new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), + new InputOption('force', 'f', InputOption::VALUE_NONE, 'Override directory if it already exists'), + new InputOption('demo', null, InputOption::VALUE_NONE, 'Add demo content (pages, templates and assets)'), + ]) ->setHelp('Creates a new website in the current directory, or in if provided'); } diff --git a/src/Command/OpenWith.php b/src/Command/OpenWith.php index b114e3187..c7041f6c1 100644 --- a/src/Command/OpenWith.php +++ b/src/Command/OpenWith.php @@ -34,12 +34,10 @@ protected function configure() $this ->setName('open') ->setDescription('Open pages directory with the editor') - ->setDefinition( - new InputDefinition([ - new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), - new InputOption('editor', null, InputOption::VALUE_REQUIRED, 'Editor to use'), - ]) - ) + ->setDefinition([ + new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), + new InputOption('editor', null, InputOption::VALUE_REQUIRED, 'Editor to use'), + ]) ->setHelp('Open pages directory with the editor defined in the configuration file.'); } diff --git a/src/Command/SelfUpdate.php b/src/Command/SelfUpdate.php index 3780aac9e..4cf4179fe 100644 --- a/src/Command/SelfUpdate.php +++ b/src/Command/SelfUpdate.php @@ -32,11 +32,11 @@ protected function configure() $this ->setName('self-update') ->setDescription('Updates Cecil to the latest version') - ->setDefinition(new InputDefinition([ + ->setDefinition([ new InputOption('rollback', null, InputOption::VALUE_NONE, 'Revert to an older installation'), new InputOption('stable', null, InputOption::VALUE_NONE, 'Force an update to the last stable version'), new InputOption('preview', null, InputOption::VALUE_NONE, 'Force an update to the last unstable version'), - ])) + ]) ->setHelp('The self-update command checks for a newer version and, if found, downloads and installs the latest'); } diff --git a/src/Command/Serve.php b/src/Command/Serve.php index 97dc6796e..41f06e45b 100644 --- a/src/Command/Serve.php +++ b/src/Command/Serve.php @@ -42,20 +42,18 @@ protected function configure() $this ->setName('serve') ->setDescription('Starts the built-in server') - ->setDefinition( - new InputDefinition([ - new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), - new InputOption('config', 'c', InputOption::VALUE_REQUIRED, 'Set the path to extra config files (comma-separated)'), - new InputOption('drafts', 'd', InputOption::VALUE_NONE, 'Include drafts'), - new InputOption('page', 'p', InputOption::VALUE_REQUIRED, 'Build a specific page'), - new InputOption('open', 'o', InputOption::VALUE_NONE, 'Open web browser automatically'), - new InputOption('host', null, InputOption::VALUE_REQUIRED, 'Server host'), - new InputOption('port', null, InputOption::VALUE_REQUIRED, 'Server port'), - new InputOption('optimize', null, InputOption::VALUE_OPTIONAL, 'Optimize files (disable with "no")', false), - new InputOption('clear-cache', null, InputOption::VALUE_OPTIONAL, 'Clear cache before build (optional cache key regular expression)', false), - new InputOption('no-ignore-vcs', null, InputOption::VALUE_NONE, 'Changes watcher must not ignore VCS directories'), - ]) - ) + ->setDefinition([ + new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), + new InputOption('config', 'c', InputOption::VALUE_REQUIRED, 'Set the path to extra config files (comma-separated)'), + new InputOption('drafts', 'd', InputOption::VALUE_NONE, 'Include drafts'), + new InputOption('page', 'p', InputOption::VALUE_REQUIRED, 'Build a specific page'), + new InputOption('open', 'o', InputOption::VALUE_NONE, 'Open web browser automatically'), + new InputOption('host', null, InputOption::VALUE_REQUIRED, 'Server host'), + new InputOption('port', null, InputOption::VALUE_REQUIRED, 'Server port'), + new InputOption('optimize', null, InputOption::VALUE_OPTIONAL, 'Optimize files (disable with "no")', false), + new InputOption('clear-cache', null, InputOption::VALUE_OPTIONAL, 'Clear cache before build (optional cache key regular expression)', false), + new InputOption('no-ignore-vcs', null, InputOption::VALUE_NONE, 'Changes watcher must not ignore VCS directories'), + ]) ->setHelp('Starts the live-reloading-built-in web server'); } diff --git a/src/Command/ShowConfig.php b/src/Command/ShowConfig.php index 4cd4d44bd..fb50d0a29 100644 --- a/src/Command/ShowConfig.php +++ b/src/Command/ShowConfig.php @@ -34,12 +34,10 @@ protected function configure() $this ->setName('show:config') ->setDescription('Shows the configuration') - ->setDefinition( - new InputDefinition([ - new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), - new InputOption('config', 'c', InputOption::VALUE_REQUIRED, 'Set the path to the config file'), - ]) - ) + ->setDefinition([ + new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), + new InputOption('config', 'c', InputOption::VALUE_REQUIRED, 'Set the path to the config file'), + ]) ->setHelp('Shows the website\'s configuration in YAML format'); } diff --git a/src/Command/ShowContent.php b/src/Command/ShowContent.php index 61d9588a2..acafc9b3f 100644 --- a/src/Command/ShowContent.php +++ b/src/Command/ShowContent.php @@ -38,12 +38,10 @@ protected function configure() $this ->setName('show:content') ->setDescription('Shows content as tree') - ->setDefinition( - new InputDefinition([ - new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), - new InputOption('config', 'c', InputOption::VALUE_REQUIRED, 'Set the path to the config file'), - ]) - ) + ->setDefinition([ + new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), + new InputOption('config', 'c', InputOption::VALUE_REQUIRED, 'Set the path to the config file'), + ]) ->setHelp('Shows the website\'s content as a tree'); } diff --git a/src/Command/UtilTemplatesExtract.php b/src/Command/UtilTemplatesExtract.php index 8370c616a..cb25407f6 100644 --- a/src/Command/UtilTemplatesExtract.php +++ b/src/Command/UtilTemplatesExtract.php @@ -35,12 +35,10 @@ protected function configure() $this ->setName('util:templates:extract') ->setDescription('Extracts built-in templates') - ->setDefinition( - new InputDefinition([ - new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), - new InputOption('force', 'f', InputOption::VALUE_NONE, 'Override files if they already exist'), - ]) - ) + ->setDefinition([ + new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), + new InputOption('force', 'f', InputOption::VALUE_NONE, 'Override files if they already exist'), + ]) ->setHelp('Extracts built-in templates in the "layouts" directory.'); }