namespace Symfony\Component\Console\Helper;
+use Symfony\Component\Console\Exception\LogicException;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Exception\LogicException;
use Symfony\Component\Console\Terminal;
/**
* @author Fabien Potencier <fabien@symfony.com>
* @author Chris Jones <leeked@gmail.com>
*/
-class ProgressBar
+final class ProgressBar
{
- // options
private $barWidth = 28;
private $barChar;
private $emptyBarChar = '-';
private $format;
private $internalFormat;
private $redrawFreq = 1;
-
- /**
- * @var OutputInterface
- */
private $output;
private $step = 0;
private $max;
$regex = "{%([a-z\-_]+)(?:\:([^%]+))?%}i";
$callback = function ($matches) {
if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) {
- $text = call_user_func($formatter, $this, $this->output);
+ $text = \call_user_func($formatter, $this, $this->output);
} elseif (isset($this->messages[$matches[1]])) {
$text = $this->messages[$matches[1]];
} else {