protected function buildGlobalRuntimeEvaluationsConditionCode(array $conditions, &$useGlobalObjects = false)
    {
        $evaluateConditionsCode = '';

        $isFirst = true;
        foreach ($conditions as $constraint) {
            $leftValue = $this->buildArgumentEvaluationAccessCode($constraint['leftValue'], $useGlobalObjects);
            $rightValue = $this->buildArgumentEvaluationAccessCode($constraint['rightValue'], $useGlobalObjects);

            if ($constraint['operator'] === 'in') {
                $evaluateConditionsCode .= ($isFirst === true ? '(' : ' && ') . '(' . $rightValue . ' instanceof \SplObjectStorage || ' . $rightValue . ' instanceof \Doctrine\Common\Collections\Collection ? ' . $leftValue . ' !== NULL && ' . $rightValue . '->contains(' . $leftValue  . ') : in_array(' . $leftValue . ', ' . $rightValue . '))';
            } elseif ($constraint['operator'] === 'contains') {
                $evaluateConditionsCode .= ($isFirst === true ? '(' : ' && ') . '(' . $leftValue . ' instanceof \SplObjectStorage || ' . $leftValue . ' instanceof \Doctrine\Common\Collections\Collection ? ' . $rightValue . ' !== NULL && ' . $leftValue . '->contains(' . $rightValue  . ') : in_array(' . $rightValue . ', ' . $leftValue . '))';
            } elseif ($constraint['operator'] === 'matches') {
                $evaluateConditionsCode .= ($isFirst === true ? '(' : ' && ') . '(!empty(array_intersect(' . $leftValue . ', ' . $rightValue . ')))';
            } else {
                $evaluateConditionsCode .= ($isFirst === true ? '(' : ' && ') . $leftValue . ' ' . $constraint['operator'] . ' ' . $rightValue;
            }

            $isFirst = false;
        }

        return $evaluateConditionsCode . ')';
    }