mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 17:24:18 +02:00
Branch: add assertBranch helper method
This commit is contained in:
parent
59f6051623
commit
b22511e341
@ -124,6 +124,13 @@ class Branch
|
||||
return $this->branchUuid !== null;
|
||||
}
|
||||
|
||||
public function assertBranch()
|
||||
{
|
||||
if ($this->isMain()) {
|
||||
throw new RuntimeException('Branch expected, but working in main branch');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user