From b17fa7dfa588fc191f4ed268b88dcaec40294acb Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 8 Dec 2016 14:24:02 -0800 Subject: [ticket/14895] Use SymfonyStyle in all CLI PHPBB3-14895 --- phpBB/phpbb/console/command/config/increment.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'phpBB/phpbb/console/command/config/increment.php') diff --git a/phpBB/phpbb/console/command/config/increment.php b/phpBB/phpbb/console/command/config/increment.php index b4d7438b66..8b3acc1620 100644 --- a/phpBB/phpbb/console/command/config/increment.php +++ b/phpBB/phpbb/console/command/config/increment.php @@ -16,6 +16,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; class increment extends command { @@ -59,12 +60,14 @@ class increment extends command */ protected function execute(InputInterface $input, OutputInterface $output) { + $io = new SymfonyStyle($input, $output); + $key = $input->getArgument('key'); $increment = $input->getArgument('increment'); $use_cache = !$input->getOption('dynamic'); $this->config->increment($key, $increment, $use_cache); - $output->writeln('' . $this->user->lang('CLI_CONFIG_INCREMENT_SUCCESS', $key) . ''); + $io->success($this->user->lang('CLI_CONFIG_INCREMENT_SUCCESS', $key)); } } -- cgit v1.2.1 From cbf6d71f6859fd6c036967ed19082f3e54efc328 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 8 Dec 2016 14:25:09 -0800 Subject: [ticket/14895] Fix issues in CLI classes PHPBB3-14895 --- phpBB/phpbb/console/command/config/increment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/console/command/config/increment.php') diff --git a/phpBB/phpbb/console/command/config/increment.php b/phpBB/phpbb/console/command/config/increment.php index 8b3acc1620..647380a0bf 100644 --- a/phpBB/phpbb/console/command/config/increment.php +++ b/phpBB/phpbb/console/command/config/increment.php @@ -55,7 +55,7 @@ class increment extends command * @param InputInterface $input An InputInterface instance * @param OutputInterface $output An OutputInterface instance * - * @return null + * @return void * @see \phpbb\config\config::increment() */ protected function execute(InputInterface $input, OutputInterface $output) -- cgit v1.2.1