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

Breadcrumb

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

function TesterTrait::getStatusCode

Gets the status code returned by the last execution of the command or application.

Throws

\RuntimeException If it's called before the execute method

File

vendor/symfony/console/Tester/TesterTrait.php, line 97

Class

TesterTrait
@author Amrouche Hamza <hamza.simperfit@gmail.com>

Namespace

Symfony\Component\Console\Tester

Code

public function getStatusCode() : int {
    return $this->statusCode ?? throw new \RuntimeException('Status code not initialized, did you execute the command before requesting the status code?');
}

API Navigation

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