function BaseCommand::getApplication
Gets the application instance for this command.
Overrides Command::getApplication
1 call to BaseCommand::getApplication()
- GlobalCommand::complete in vendor/
composer/ composer/ src/ Composer/ Command/ GlobalCommand.php - @inheritdoc
File
-
vendor/
composer/ composer/ src/ Composer/ Command/ BaseCommand.php, line 60
Class
- BaseCommand
- Base class for Composer commands
Namespace
Composer\CommandCode
public function getApplication() : Application {
$application = parent::getApplication();
if (!$application instanceof Application) {
throw new \RuntimeException('Composer commands can only work with an ' . Application::class . ' instance set');
}
return $application;
}