From 235026e2c708eea306a12f1cc1de3da38593db37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 28 Apr 2016 13:41:36 +0200 Subject: Enhance option in command --- src/Wallabag/ImportBundle/Command/ImportCommand.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/ImportBundle/Command/ImportCommand.php b/src/Wallabag/ImportBundle/Command/ImportCommand.php index f62176fc..a4aa8531 100644 --- a/src/Wallabag/ImportBundle/Command/ImportCommand.php +++ b/src/Wallabag/ImportBundle/Command/ImportCommand.php @@ -18,7 +18,7 @@ class ImportCommand extends ContainerAwareCommand ->addArgument('userId', InputArgument::REQUIRED, 'User ID to populate') ->addArgument('filepath', InputArgument::REQUIRED, 'Path to the JSON file') ->addOption('importer', null, InputArgument::OPTIONAL, 'The importer to use: v1 or v2', 'v1') - ->addOption('markAsRead', null, InputArgument::OPTIONAL, 'Mark all entries as read: true/false', false) + ->addOption('markAsRead', null, InputArgument::OPTIONAL, 'Mark all entries as read', false) ; } @@ -42,9 +42,7 @@ class ImportCommand extends ContainerAwareCommand $wallabag = $this->getContainer()->get('wallabag_import.wallabag_v2.import'); } - if ('yes' === $input->getOption('markAsRead')) { - $wallabag->setMarkAsRead(true); - } + $wallabag->setMarkAsRead($input->getOption('markAsRead')); $res = $wallabag ->setUser($user) -- cgit v1.2.3