Skip to content

Commit

Permalink
[Console] simplified code (refs #9420)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Nov 9, 2013
1 parent b9b7c8a commit b76ac2f
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/Symfony/Component/Console/Helper/ProgressHelper.php
Expand Up @@ -227,18 +227,7 @@ public function start(OutputInterface $output, $max = null)
*/
public function advance($step = 1, $redraw = false)
{
if (null === $this->startTime) {
throw new \LogicException('You must start the progress bar before calling advance().');
}

if (0 === $this->current) {
$redraw = true;
}

$this->current += $step;
if ($redraw || 0 === $this->current % $this->redrawFreq) {
$this->display();
}
$this->setCurrent($this->current + $step, $redraw);
}

/**
Expand Down

0 comments on commit b76ac2f

Please sign in to comment.