[Console] removed unneeded private methods

This commit is contained in:
Fabien Potencier 2016-06-24 07:18:49 +02:00
parent 448a390970
commit 35f32ebe12

View File

@ -523,7 +523,7 @@ class ProgressBar
private function overwrite($message) private function overwrite($message)
{ {
if ($this->overwrite) { if ($this->overwrite) {
if (!$this->isFirstRun()) { if (!$this->firstRun) {
// Move the cursor to the beginning of the line // Move the cursor to the beginning of the line
$this->output->write("\x0D"); $this->output->write("\x0D");
@ -539,7 +539,7 @@ class ProgressBar
$this->output->writeln(''); $this->output->writeln('');
} }
$this->setFirstRun(false); $this->firstRun = false;
$this->output->write($message); $this->output->write($message);
} }
@ -632,14 +632,4 @@ class ProgressBar
'debug_nomax' => ' %current% [%bar%] %elapsed:6s% %memory:6s%', 'debug_nomax' => ' %current% [%bar%] %elapsed:6s% %memory:6s%',
); );
} }
private function isFirstRun()
{
return $this->firstRun;
}
private function setFirstRun($firstRun)
{
$this->firstRun = (bool) $firstRun;
}
} }