function ProgressIndicator::finish
Finish the indicator with message.
Parameters
?string $finishedIndicator:
File
-
vendor/
symfony/ console/ Helper/ ProgressIndicator.php, line 134
Class
- ProgressIndicator
- @author Kevin Bond <kevinbond@gmail.com>
Namespace
Symfony\Component\Console\HelperCode
public function finish(string $message) : void {
$finishedIndicator = 1 < \func_num_args() ? func_get_arg(1) : null;
if (null !== $finishedIndicator && !\is_string($finishedIndicator)) {
throw new \TypeError(\sprintf('Argument 2 passed to "%s()" must be of the type string or null, "%s" given.', __METHOD__, get_debug_type($finishedIndicator)));
}
if (!$this->started) {
throw new LogicException('Progress indicator has not yet been started.');
}
if (null !== $finishedIndicator) {
$this->finishedIndicatorValue = $finishedIndicator;
}
$this->finished = true;
$this->message = $message;
$this->display();
$this->output
->writeln('');
$this->started = false;
}