You are here

public function ProgressHelper::finish in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Helper/ProgressHelper.php \Symfony\Component\Console\Helper\ProgressHelper::finish()

Finishes the progress output.

File

vendor/symfony/console/Helper/ProgressHelper.php, line 315

Class

ProgressHelper
The Progress class provides helpers to display progress output.

Namespace

Symfony\Component\Console\Helper

Code

public function finish() {
  if (null === $this->startTime) {
    throw new \LogicException('You must start the progress bar before calling finish().');
  }
  if (null !== $this->startTime) {
    if (!$this->max) {
      $this->barChar = $this->barCharOriginal;
      $this
        ->display(true);
    }
    $this->startTime = null;
    $this->output
      ->writeln('');
    $this->output = null;
  }
}