mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-12 02:25:18 +02:00
[ticket/13740] Clean up CLI CS
PHPBB3-13740
This commit is contained in:
parent
10f6716566
commit
8bfd29e86d
@ -14,7 +14,6 @@
|
|||||||
namespace phpbb\install\helper\iohandler;
|
namespace phpbb\install\helper\iohandler;
|
||||||
|
|
||||||
use phpbb\install\exception\installer_exception;
|
use phpbb\install\exception\installer_exception;
|
||||||
use Symfony\Component\Console\Helper\ProgressBar;
|
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Symfony\Component\Console\Style\OutputStyle;
|
use Symfony\Component\Console\Style\OutputStyle;
|
||||||
|
|
||||||
@ -39,7 +38,7 @@ class cli_iohandler extends iohandler_base
|
|||||||
protected $input_values = array();
|
protected $input_values = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ProgressBar
|
* @var \Symfony\Component\Console\Helper\ProgressBar
|
||||||
*/
|
*/
|
||||||
protected $progress_bar;
|
protected $progress_bar;
|
||||||
|
|
||||||
@ -66,7 +65,6 @@ class cli_iohandler extends iohandler_base
|
|||||||
$result = $this->input_values[$name];
|
$result = $this->input_values[$name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($multibyte)
|
if ($multibyte)
|
||||||
{
|
{
|
||||||
return utf8_normalize_nfc($result);
|
return utf8_normalize_nfc($result);
|
||||||
@ -160,7 +158,8 @@ class cli_iohandler extends iohandler_base
|
|||||||
{
|
{
|
||||||
if ($this->output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL)
|
if ($this->output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL)
|
||||||
{
|
{
|
||||||
$this->output->writeln(sprintf('[%3d/%-3d] ---- %s', $this->current_task_progress, $this->task_progress_count, $this->translate_message($log_title, $log_description)['title']));
|
$message = $this->translate_message($log_title, $log_description);
|
||||||
|
$this->output->writeln(sprintf('[%3d/%-3d] ---- %s', $this->current_task_progress, $this->task_progress_count, $message['title']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,11 +192,13 @@ class cli_iohandler extends iohandler_base
|
|||||||
" %message%\n");
|
" %message%\n");
|
||||||
$this->progress_bar->setBarWidth(60);
|
$this->progress_bar->setBarWidth(60);
|
||||||
|
|
||||||
if (!defined('PHP_WINDOWS_VERSION_BUILD')) {
|
if (!defined('PHP_WINDOWS_VERSION_BUILD'))
|
||||||
|
{
|
||||||
$this->progress_bar->setEmptyBarCharacter('░'); // light shade character \u2591
|
$this->progress_bar->setEmptyBarCharacter('░'); // light shade character \u2591
|
||||||
$this->progress_bar->setProgressCharacter('');
|
$this->progress_bar->setProgressCharacter('');
|
||||||
$this->progress_bar->setBarCharacter('▓'); // dark shade character \u2593
|
$this->progress_bar->setBarCharacter('▓'); // dark shade character \u2593
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->progress_bar->setMessage('');
|
$this->progress_bar->setMessage('');
|
||||||
$this->io->newLine(2);
|
$this->io->newLine(2);
|
||||||
$this->progress_bar->start();
|
$this->progress_bar->start();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user