protected function getLogicalResult(callable $logicalAndFunction, callable $logicalOrFunction)
    {
        switch ($this->operator) {
            case ConditionParser::LOGICAL_AND:
                $result = call_user_func($logicalAndFunction);
                break;
            case ConditionParser::LOGICAL_OR:
                $result = call_user_func($logicalOrFunction);
                break;
            default:
                throw InvalidConfigurationException::wrongBooleanNodeOperator($this->operator);
        }

        return $result;
    }