summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Brahmer <info@b-brahmer.de>2021-12-02 21:01:38 +0100
committerBenjamin Brahmer <info@b-brahmer.de>2021-12-03 21:39:47 +0100
commita9e4a5abd36e00908b08d5b135e8581b78c7bc9d (patch)
tree71207ebc7c2cc8534c7ba07b9fa3ea6cc57c02f5
parent999a73b182856e7f6be93a92bc56588915adfcea (diff)
let Symfony handle the defualt vote value
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
-rw-r--r--lib/Command/ExploreGenerator.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Command/ExploreGenerator.php b/lib/Command/ExploreGenerator.php
index 01ef2a866..b8392ce53 100644
--- a/lib/Command/ExploreGenerator.php
+++ b/lib/Command/ExploreGenerator.php
@@ -64,16 +64,13 @@ class ExploreGenerator extends Command
'feed URL and votes, e.g.: ' . json_encode($result)
)
->addArgument('feed', InputArgument::REQUIRED, 'Feed to parse')
- ->addOption('votes', null, InputOption::VALUE_OPTIONAL, 'Votes for the feed, defaults to 100');
+ ->addOption('votes', null, InputOption::VALUE_OPTIONAL, 'Votes for the feed, defaults to 100', 100);
}
protected function execute(InputInterface $input, OutputInterface $output): int
{
$url = $input->getArgument('feed');
$votes = $input->getOption('votes');
- if (!$votes) {
- $votes = 100;
- }
try {
$resource = $this->reader->read($url);