<commit_before><div>
    <?php
    $validate = '';
    $validate_min = '';
    $validate_max = '';
    $options = $this->getFieldOptions();
    foreach ($this->getFieldOptions() as $i => $option) {
        $checked = false;
        $validate_min = '';
        $validate_max = '';
        if ($option["checked"]) {
            $checked = 'checked';
        }
        if ($this->getField()->getRequired() && $i == (count($options) - 1)) {
            $validate = "validate-one-required-by-name";
            if ($this->getField()->getData('validate_regex')) {
                $validate .= ' validate-field-' . $this->getField()->getId();
            }
            $validate .= ' ' . $this->getFieldClass();
        }
        if ($this->getMin() && $i == (count($options) - 1)) {
            $validate_min = "validate-field-options-min-{$this->getField()->getId()}";
        }
        if ($this->getMax() && $i == (count($options) - 1)) {
            $validate_max = "validate-field-options-max-{$this->getField()->getId()}";
        }
        if(!$this->getField()->getValidationAdvice()){
            $this->getField()->setValidationAdvice(__('Please select one of the options.'));
        }
        if (isset($option["value"]) && empty($option['optgroup']) && empty($option['optgroup_close'])) {
            $label = $option["label"];
            if ($option["image_src"]) {
                $label = "<figure><img src='{$option['image_src']}'/><figcaption>{$label}</figcaption></figure>";
            }
            ?>
              <div
                class='
                  field
                  choice
                  option-<?php echo $i?>
                  checkbox
                '
                style='<?php echo $this->getFieldStyle() ?>'
              >
                <input type='checkbox'
                    name='<?php echo $this->getFieldName() ?>[]'
                    id='<?php echo $this->getFieldId() . $i ?>'
                    value="<?php echo htmlspecialchars($option["value"]) ?>"
                    class='
                        checkbox__field <?php echo $validate ?>
                        <?php echo $validate_min?> <?php echo $validate_max?>
                    '
                    <?php echo $checked ?>
                    aria-labelledby="
                        <?php echo $this->getFieldId() . $i ?>
                        _label<?php if(!$this->getField()->getHideLabel()){?>
                        label_<?php echo $this->getFieldId() ?><?php } ?>
                    "
                    <?php echo htmlspecialchars($this->getField()->getCustomAttributes())?>
                />
                <svg
                    class="
                            checkbox__icon
                            checkbox__icon--checked
                        "
                        role="presentation"
                        focusable="false"
                        >
                            <use href="<?= $block->escapeUrl($block->getViewFileUrl('images/icons-sprite.svg#checked')) ?>"/>
                        </svg>
                        <svg
                        class="
                            checkbox__icon
                            checkbox__icon--unchecked
                        "
                        role="presentation"
                        focusable="false"
                        >
                            <use href="<?= $block->escapeUrl($block->getViewFileUrl('images/icons-sprite.svg#unchecked')) ?>"/>
                    </svg>
                    <label
                        id="<?php echo $this->getFieldId() . $i ?>_label"
                        for='<?php echo $this->getFieldId() . $i ?>'
                        class="checkbox__label"
                    >
                        <?php echo $label ?>
                    </label>
                <?php
                $tooltip = $this->getField()->getTooltip($option["value"]);
                if ($tooltip) {
                    echo $this->getLayout()->createBlock(
                        'VladimirPopov\WebForms\Block\Script\Tooltip',
                        null
                    )->setField($this->getField())->setTooltip($tooltip)->toHtml();
                }
                ?>
            </div>
            <?php
        }
    }
    ?>
</div>
<?php if($validate_min) {
    $validate_message = __('Please check at least %1 options', $this->getField()->getValue('options_checkbox_min'));
    if (!empty($this->getField()->getValue('options_checkbox_min_error_text')))
        $validate_message = $this->getField()->getValue('options_checkbox_min_error_text');
    ?>
    <div class="validation-advice"
         id="advice-validate-field-options-min-<?php echo $this->getField()->getId()?>-<?php echo $this->getFieldId(). $i?>"
         style="display:none"><?php echo $validate_message ?></div><commit_msg>83891 lint fix<commit_after><div>
    <?php
    $validate = '';
    $validate_min = '';
    $validate_max = '';
    $options = $this->getFieldOptions();
    foreach ($this->getFieldOptions() as $i => $option) {
        $checked = false;
        $validate_min = '';
        $validate_max = '';
        if ($option["checked"]) {
            $checked = 'checked';
        }
        if ($this->getField()->getRequired() && $i == (count($options) - 1)) {
            $validate = "validate-one-required-by-name";
            if ($this->getField()->getData('validate_regex')) {
                $validate .= ' validate-field-' . $this->getField()->getId();
            }
            $validate .= ' ' . $this->getFieldClass();
        }
        if ($this->getMin() && $i == (count($options) - 1)) {
            $validate_min = "validate-field-options-min-{$this->getField()->getId()}";
        }
        if ($this->getMax() && $i == (count($options) - 1)) {
            $validate_max = "validate-field-options-max-{$this->getField()->getId()}";
        }
        if(!$this->getField()->getValidationAdvice()){
            $this->getField()->setValidationAdvice(__('Please select one of the options.'));
        }
        if (isset($option["value"]) && empty($option['optgroup']) && empty($option['optgroup_close'])) {
            $label = $option["label"];
            if ($option["image_src"]) {
                $label = "<figure><img src='{$option['image_src']}'/><figcaption>{$label}</figcaption></figure>";
            }
            ?>
            <div
                class='
                    field
                    choice
                    option-<?php echo $i?>
                    checkbox
                '
                style='<?php echo $this->getFieldStyle() ?>'
            >
                <input type='checkbox'
                    name='<?php echo $this->getFieldName() ?>[]'
                    id='<?php echo $this->getFieldId() . $i ?>'
                    value="<?php echo htmlspecialchars($option["value"]) ?>"
                    class='
                        checkbox__field
                        <?php echo $validate ?>
                        <?php echo $validate_min?>
                        <?php echo $validate_max?>
                    '
                    <?php echo $checked ?>
                    aria-labelledby="
                        <?php echo $this->getFieldId() . $i ?>
                        _label<?php if(!$this->getField()->getHideLabel()){?>
                        label_<?php echo $this->getFieldId() ?><?php } ?>
                    "
                    <?php echo htmlspecialchars($this->getField()->getCustomAttributes())?>
                />
                <svg
                    class="checkbox__icon checkbox__icon--checked"
                    role="presentation"
                    focusable="false"
                >
                    <use href="<?= $block->escapeUrl($block->getViewFileUrl('images/icons-sprite.svg#checked')) ?>"/>
                </svg>
                    <svg
                    class="checkbox__icon checkbox__icon--unchecked"
                    role="presentation"
                    focusable="false"
                >
                    <use href="<?= $block->escapeUrl($block->getViewFileUrl('images/icons-sprite.svg#unchecked')) ?>"/>
                </svg>
                <label
                    id="<?php echo $this->getFieldId() . $i ?>_label"
                    for='<?php echo $this->getFieldId() . $i ?>'
                    class="checkbox__label"
                >
                    <?php echo $label ?>
                </label>
                <?php
                    $tooltip = $this->getField()->getTooltip($option["value"]);
                    if ($tooltip) {
                        echo $this->getLayout()->createBlock(
                            'VladimirPopov\WebForms\Block\Script\Tooltip',
                            null
                        )->setField($this->getField())->setTooltip($tooltip)->toHtml();
                    }
                ?>
            </div>
            <?php
        }
    }
    ?>
</div>
<?php if($validate_min) {
    $validate_message = __('Please check at least %1 options', $this->getField()->getValue('options_checkbox_min'));
    if (!empty($this->getField()->getValue('options_checkbox_min_error_text')))
        $validate_message = $this->getField()->getValue('options_checkbox_min_error_text');
    ?>
    <div class="validation-advice"
         id="advice-validate-field-options-min-<?php echo $this->getField()->getId()?>-<?php echo $this->getFieldId(). $i?>"
         style="display:none"><?php echo $validate_message ?></div>
{'fraction_non_alphanumeric': 0.16657968896774866, 'fraction_numerical': 0.0013568521031207597, 'mean_word_length': 1.4057243283956817, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 199, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '376478', 'n_tokens_mistral': 2487, 'n_tokens_neox': 2383, 'n_words': 381}