public function hasVariableInBranch($name, $compareBranch, $compilationContext = null)
{
$branch = $this->resolveVariableToBranch($name, $compilationContext ?: $this->compilationContext);
if (!$branch || $branch != $compareBranch) {
return false;
}
return true;
}