protected function _progressBar()
{
if ($this->_current > $this->_total) {
return;
}
$percent = $this->_current / $this->_total;
$nb = $percent * $this->_size;
$b = str_repeat($this->_chars['bar'], floor($nb));
$i = '';
if ($nb < $this->_size) {
$i = str_pad($this->_chars['indicator'], $this->_size - strlen($b));
}
$p = floor($percent * 100);
$string = Text::insert($this->_format, compact('p', 'b', 'i'));
$this->write("\r" . $string, $this->_color);
}