mirror of
https://github.com/chylex/Nextcloud-News.git
synced 2025-04-25 11:15:47 +02:00
let Symfony handle the defualt vote value
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
This commit is contained in:
parent
999a73b182
commit
a9e4a5abd3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user