Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ProgressIndicator.php

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\Helper

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal