Branch: add assertBranch helper method

This commit is contained in:
Thomas Gelf 2021-10-05 22:26:24 +02:00
parent 59f6051623
commit b22511e341

View File

@ -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
*/