mirror of
https://github.com/flextype/flextype.git
synced 2025-08-06 13:16:45 +02:00
feat(console): improve cache:get-multiple
logic
This commit is contained in:
@@ -32,7 +32,7 @@ class CacheGetMultipleCommand extends Command
|
||||
$this->setDescription('Get multiple items.');
|
||||
$this->addArgument('keys', InputArgument::REQUIRED, 'Keys.');
|
||||
$this->addArgument('default', InputArgument::OPTIONAL, 'Default.');
|
||||
$this->addOption('template', null, InputOption::VALUE_REQUIRED, 'Set this flag to set result print style: pretty(default), json.');
|
||||
$this->addOption('output', null, InputOption::VALUE_REQUIRED, 'Set this flag to set result output style: pretty(default), json.');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
@@ -52,8 +52,8 @@ class CacheGetMultipleCommand extends Command
|
||||
}
|
||||
};
|
||||
|
||||
if ($input->getOption('template')) {
|
||||
switch ($input->getOption('template')) {
|
||||
if ($input->getOption('output')) {
|
||||
switch ($input->getOption('output')) {
|
||||
case 'json':
|
||||
$output->write(
|
||||
renderToString(
|
||||
|
Reference in New Issue
Block a user