/**
* Handles the "bind --delete" command.
*
* @param Args $args The console arguments
*
* @return int The status code
*/
public function handleDelete(Args $args)
{
$bindingToRemove = $this->getBindingByUuidPrefix($args->getArgument('uuid'));
if (!$bindingToRemove->getContainingModule() instanceof RootModule) {
throw new RuntimeException(sprintf('Can only delete bindings from the module "%s".', $this->modules->getRootModuleName()));
}
$this->discoveryManager->removeRootBindingDescriptor($bindingToRemove->getUuid());
return 0;
}