protected static function evaluateLogicalOperator(array $leftSide, $operator, array $rightSide)
{
$leftCondition = self::evaluateStack(self::prepareSideForEvaluation($leftSide));
$rightCondition = self::evaluateStack(self::prepareSideForEvaluation($rightSide));
if (self::OPERATOR_LOGICAL_AND === $operator) {
return $leftCondition && $rightCondition;
} elseif (self::OPERATOR_LOGICAL_OR === $operator) {
return $leftCondition || $rightCondition;
}
throw new \RuntimeException('The stack could not be evaluated (internal error).', 1385072357);
}