public function optimizeNot($expr, CompilationContext $compilationContext)
{
/**
* Compile the expression negating the evaluated expression
*/
if ($expr['type'] == 'not') {
$conditions = $this->optimize($expr['left'], $compilationContext);
if ($conditions !== false) {
if ($this->_unreachable !== null) {
$this->_unreachable = !$this->_unreachable;
}
if ($this->_unreachableElse !== null) {
$this->_unreachableElse = !$this->_unreachableElse;
}
return '!(' . $conditions . ')';
}
}
return false;
}