public function createCommand($packageKey, $packageType = PackageInterface::DEFAULT_COMPOSER_TYPE)
{
if (!$this->packageManager->isPackageKeyValid($packageKey)) {
$this->outputLine('The package key "%s" is not valid.', [$packageKey]);
$this->quit(1);
}
if ($this->packageManager->isPackageAvailable($packageKey)) {
$this->outputLine('The package "%s" already exists.', [$packageKey]);
$this->quit(1);
}
if (!ComposerUtility::isFlowPackageType($packageType)) {
$this->outputLine('The package must be a Flow package, but "%s" is not a valid Flow package type.', [$packageType]);
$this->quit(1);
}
$package = $this->packageManager->createPackage($packageKey, ['type' => $packageType], null);
$this->outputLine('Created new package "' . $packageKey . '" at "' . $package->getPackagePath() . '".');
}