1
0
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:
Awilum
2022-04-30 11:06:50 +03:00
parent b0e8186498
commit 0f1a117ce2

View File

@@ -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(