<commit_before><?php

namespace Formulaic\Fieldset;

trait Tostring
{
    public function __toString()
    {
        $out = '<fieldset'.$this->attributes().'>';
        if (isset($this->legend)) {
            $out .= "\n<legend>{$this->legend}</legend>";
        }
        $fields = (array)$this;
        if ($fields) {
            $out .= "\n";
            foreach ($fields as $field) {
                if (isset($this->prefix)) {
                    $field->prefix($this->prefix);
                }
                $out .= "<div>$field</div>\n";
            }
        }
        $out .= '</fieldset>';
        return $out;
    }
}

<commit_msg>this should be imploded here (prefix is an array)<commit_after><?php

namespace Formulaic\Fieldset;

trait Tostring
{
    public function __toString()
    {
        $out = '<fieldset'.$this->attributes().'>';
        if (isset($this->legend)) {
            $out .= "\n<legend>{$this->legend}</legend>";
        }
        $fields = (array)$this;
        if ($fields) {
            $out .= "\n";
            foreach ($fields as $field) {
                if (isset($this->prefix)) {
                    $field->prefix(implode('-', $this->prefix));
                }
                $out .= "<div>$field</div>\n";
            }
        }
        $out .= '</fieldset>';
        return $out;
    }
}


{'fraction_non_alphanumeric': 0.1865671641791045, 'fraction_numerical': 0.0, 'mean_word_length': 1.478743068391867, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 27, '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': '2979902', 'n_tokens_mistral': 404, 'n_tokens_neox': 389, 'n_words': 75}