protected function buildRuntimeEvaluationsConditionCode($operator, array $conditions, &$useGlobalObjects = false)
    {
        $conditionsCode = [];

        if (count($conditions) === 0) {
            return '';
        }

        if (isset($conditions['evaluateConditions']) && is_array($conditions['evaluateConditions'])) {
            $conditionsCode[] = $this->buildGlobalRuntimeEvaluationsConditionCode($conditions['evaluateConditions'], $useGlobalObjects);
            unset($conditions['evaluateConditions']);
        }

        if (isset($conditions['methodArgumentConstraints']) && is_array($conditions['methodArgumentConstraints'])) {
            $conditionsCode[] = $this->buildMethodArgumentsEvaluationConditionCode($conditions['methodArgumentConstraints'], $useGlobalObjects);
            unset($conditions['methodArgumentConstraints']);
        }

        $subConditionsCode = '';
        if (count($conditions) > 1) {
            $isFirst = true;
            foreach ($conditions as $subOperator => $subCondition) {
                $negateCurrentSubCondition = false;
                if ($subOperator === '&&!') {
                    $subOperator = '&&';
                    $negateCurrentSubCondition = true;
                } elseif ($subOperator === '||!') {
                    $subOperator = '||';
                    $negateCurrentSubCondition = true;
                }

                $currentSubConditionsCode = $this->buildRuntimeEvaluationsConditionCode($subOperator, $subCondition, $useGlobalObjects);
                if ($negateCurrentSubCondition === true) {
                    $currentSubConditionsCode = '(!' . $currentSubConditionsCode . ')';
                }

                $subConditionsCode .= ($isFirst === true ? '(' : ' ' . $subOperator . ' ') . $currentSubConditionsCode;
                $isFirst = false;
            }
            $subConditionsCode .= ')';

            $conditionsCode[] = $subConditionsCode;
        } elseif (count($conditions) === 1) {
            $subOperator = key($conditions);
            $conditionsCode[] = $this->buildRuntimeEvaluationsConditionCode($subOperator, current($conditions), $useGlobalObjects);
        }

        $negateCondition = false;
        if ($operator === '&&!') {
            $operator = '&&';
            $negateCondition = true;
        } elseif ($operator === '||!') {
            $operator = '||';
            $negateCondition = true;
        }

        $resultCode = implode(' ' . $operator . ' ', $conditionsCode);

        if (count($conditionsCode) > 1) {
            $resultCode = '(' . $resultCode . ')';
        }
        if ($negateCondition === true) {
            $resultCode = '(!' . $resultCode . ')';
        }

        return $resultCode;
    }