mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 08:44:11 +02:00
ObjectCommand: improve readability
This commit is contained in:
parent
a149206418
commit
8ce323bde1
@ -214,11 +214,13 @@ class ObjectCommand extends Command
|
||||
*/
|
||||
public function deleteAction()
|
||||
{
|
||||
$type = $this->getType();
|
||||
$name = $this->getName();
|
||||
if ($this->getObject()->delete()) {
|
||||
printf("%s '%s' has been deleted\n", $this->getType(), $this->getName());
|
||||
printf("%s '%s' has been deleted\n", $type, $name);
|
||||
exit(0);
|
||||
} else {
|
||||
printf("Something went wrong while deleting %s '%s'\n", $this->getType(), $this->getName());
|
||||
printf("Something went wrong while deleting %s '%s'\n", $type, $name);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user