<commit_before><?php
$actionsExist = !empty($actions['entity']);
$titleOptions = [];
$bodyOptions = [];
$imageOptions = [];
foreach ($fields as $field => $options) {
    unset($options['td']);
    if ($field === $indexTitleField) {
        $titleOptions = $options;
    } elseif ($field === $indexBodyField) {
        $bodyOptions = $options;
    } elseif ($field === $indexImageField) {
        $imageOptions = $options;
    }
}
?>
<div class="row">
    <?php foreach (${$viewVar} as $singularVar) : ?>
        <div class="<?= $indexGalleryCssClasses ?>">
            <?php
                $imageAltContent = $this->CrudView->fieldValue($singularVar, $indexTitleField);
                $titleContent = $this->CrudView->process($indexTitleField, $singularVar, $titleOptions);
                $bodyContent = $this->CrudView->process($indexBodyField, $singularVar, $bodyOptions);
                $imageContent = $this->CrudView->process($indexImageField, $singularVar, $bodyOptions);<commit_msg>fix: use correct variable for imageOptions<commit_after><?php
$actionsExist = !empty($actions['entity']);
$titleOptions = [];
$bodyOptions = [];
$imageOptions = [];
foreach ($fields as $field => $options) {
    unset($options['td']);
    if ($field === $indexTitleField) {
        $titleOptions = $options;
    } elseif ($field === $indexBodyField) {
        $bodyOptions = $options;
    } elseif ($field === $indexImageField) {
        $imageOptions = $options;
    }
}
?>
<div class="row">
    <?php foreach (${$viewVar} as $singularVar) : ?>
        <div class="<?= $indexGalleryCssClasses ?>">
            <?php
                $imageAltContent = $this->CrudView->fieldValue($singularVar, $indexTitleField);
                $titleContent = $this->CrudView->process($indexTitleField, $singularVar, $titleOptions);
                $bodyContent = $this->CrudView->process($indexBodyField, $singularVar, $bodyOptions);
                $imageContent = $this->CrudView->process($indexImageField, $singularVar, $imageOptions);
{'fraction_non_alphanumeric': 0.17609126984126985, 'fraction_numerical': 0.0, 'mean_word_length': 3.482222222222222, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 31, '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': '3854644', 'n_tokens_mistral': 590, 'n_tokens_neox': 581, 'n_words': 110}