<commit_before><?php

namespace Formulaic\Validate;

trait Group
{
    public function valid()
    {
        foreach ((array)$this as $element) {
            if (!$element->valid()) {
                return false;
            }
        }
        return true;
    }
    
    public function errors(array $errors = null)
    {
        $errors = [];
        foreach ((array)$this as $element) {
            $errors = array_merge($error, $element->errors());
        }
        return $errors;
    }
}
<commit_msg>fix typo<commit_after><?php

namespace Formulaic\Validate;

trait Group
{
    public function valid()
    {
        foreach ((array)$this as $element) {
            if (!$element->valid()) {
                return false;
            }
        }
        return true;
    }
    
    public function errors(array $errors = null)
    {
        $errors = [];
        foreach ((array)$this as $element) {
            $errors = array_merge($errors, $element->errors());
        }
        return $errors;
    }
}

{'fraction_non_alphanumeric': 0.1301775147928994, 'fraction_numerical': 0.0, 'mean_word_length': 1.6432291666666667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3357562', 'n_tokens_mistral': 281, 'n_tokens_neox': 286, 'n_words': 67}