From 746db2a89e6607fb4ba01f7c5fc01e0aba43e24f Mon Sep 17 00:00:00 2001 From: Craig Davis Date: Sun, 13 Apr 2014 12:56:33 -0500 Subject: [PATCH] Remove default value for refresh option, fixes #22 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default value was making the refresh option have a value even if the input option was omitted from the command. I believe this is a bug in Symfony Command. I’ve removed the default value, and now the `-r` option requires a value. --- src/Resume/Command/HtmlCommand.php | 8 +++----- src/Resume/Command/PdfCommand.php | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Resume/Command/HtmlCommand.php b/src/Resume/Command/HtmlCommand.php index 5aa0fa7..b64cc74 100644 --- a/src/Resume/Command/HtmlCommand.php +++ b/src/Resume/Command/HtmlCommand.php @@ -33,17 +33,15 @@ class HtmlCommand extends Command ->addOption( 'template', 't', - InputOption::VALUE_OPTIONAL, + InputOption::VALUE_REQUIRED, 'Which of the templates to use' ) ->addOption( 'refresh', 'r', - InputOption::VALUE_OPTIONAL, + InputOption::VALUE_REQUIRED, 'Regenerate the html and include a meta command to refresh the ' . - 'document every periodically. Measured in seconds. Defaults to' . - '5 seconds', - 5 + 'document every periodically. Measured in seconds.' ); } diff --git a/src/Resume/Command/PdfCommand.php b/src/Resume/Command/PdfCommand.php index 72211f7..8009b59 100644 --- a/src/Resume/Command/PdfCommand.php +++ b/src/Resume/Command/PdfCommand.php @@ -27,7 +27,7 @@ class PdfCommand extends HtmlCommand ->addOption( 'template', 't', - InputOption::VALUE_OPTIONAL, + InputOption::VALUE_REQUIRED, 'Which of the templates to use' ); }