protected function execute(InputInterface $input, OutputInterface $output)
{
$this->validateInput($input);
$id = $input->getArgument('id');
$integration = $this->getSelectedProject()->getIntegration($id);
if (!$integration) {
$this->stdErr->writeln("Integration not found: <error>{$id}</error>");
return 1;
}
$type = $integration->getProperty('type');
$confirmText = "Delete the integration <info>{$id}</info> (type: {$type})?";
if (!$this->getHelper('question')->confirm($confirmText)) {
return 1;
}
$result = $integration->delete();
$this->stdErr->writeln("Deleted integration <info>{$id}</info>");
if (!$input->getOption('no-wait')) {
ActivityUtil::waitMultiple($result->getActivities(), $this->stdErr, $this->getSelectedProject());
}
return 0;
}