Remove default value for refresh option, fixes #22

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.
This commit is contained in:
Craig Davis 2014-04-13 12:56:33 -05:00
parent 91e97e2354
commit 746db2a89e
2 changed files with 4 additions and 6 deletions

View File

@ -33,17 +33,15 @@ class HtmlCommand extends Command
->addOption( ->addOption(
'template', 'template',
't', 't',
InputOption::VALUE_OPTIONAL, InputOption::VALUE_REQUIRED,
'Which of the templates to use' 'Which of the templates to use'
) )
->addOption( ->addOption(
'refresh', 'refresh',
'r', 'r',
InputOption::VALUE_OPTIONAL, InputOption::VALUE_REQUIRED,
'Regenerate the html and include a meta command to refresh the ' . 'Regenerate the html and include a meta command to refresh the ' .
'document every periodically. Measured in seconds. Defaults to' . 'document every periodically. Measured in seconds.'
'5 seconds',
5
); );
} }

View File

@ -27,7 +27,7 @@ class PdfCommand extends HtmlCommand
->addOption( ->addOption(
'template', 'template',
't', 't',
InputOption::VALUE_OPTIONAL, InputOption::VALUE_REQUIRED,
'Which of the templates to use' 'Which of the templates to use'
); );
} }