<commit_before><?php

namespace Dhii\Validation;

use Dhii\Validation\Exception\ValidationExceptionInterface;
use InvalidArgumentException;
use OutOfRangeException;
use stdClass;
use Traversable;
use Dhii\Validation\Exception\ValidationFailedExceptionInterface;
use Dhii\Util\String\StringableInterface as Stringable;
use Exception as RootException;

/**
 * Common functionality for composite validators.
 * 
 * Composite validators are validators that use one or more "child" validators
 * to validate the subject.
 *
 * @since [*next-version*]
 */
trait GetValidationErrorsCapableCompositeTrait
{
    /**
     * {@inheritdoc}
     *
     * @since [*next-version*]
     *
     * @throws InvalidArgumentException If the spec not a valid list.
     * @throws OutOfRangeException If one of the child validators is not a validator.
     * @throws ValidationExceptionInterface If problem validating.
     */
    protected function _getValidationErrors($subject, $spec = null)
    {
        if (!is_null($spec)) {
            $spec = $this->_normalizeIterable($spec);
        }

        $errors = array();
        foreach ($this->_getChildValidators() as $_idx => $_validator) {

            try {
                if ($_validator instanceof SpecValidatorInterface) {
                    $_validator->validate($subject, $spec);
                }
                elseif ($_validator instanceof ValidatorInterface) {<commit_msg>`_getValidationErrors()` no longer validates criteria list<commit_after><?php

namespace Dhii\Validation;

use Dhii\Validation\Exception\ValidationExceptionInterface;
use InvalidArgumentException;
use OutOfRangeException;
use stdClass;
use Traversable;
use Dhii\Validation\Exception\ValidationFailedExceptionInterface;
use Dhii\Util\String\StringableInterface as Stringable;
use Exception as RootException;

/**
 * Common functionality for composite validators.
 * 
 * Composite validators are validators that use one or more "child" validators
 * to validate the subject.
 *
 * @since [*next-version*]
 */
trait GetValidationErrorsCapableCompositeTrait
{
    /**
     * {@inheritdoc}
     *
     * @since [*next-version*]
     *
     * @throws OutOfRangeException If one of the child validators is not a validator.
     * @throws ValidationExceptionInterface If problem validating.
     */
    protected function _getValidationErrors($subject, $spec = null)
    {
        $errors = array();
        foreach ($this->_getChildValidators() as $_idx => $_validator) {

            try {
                if ($_validator instanceof SpecValidatorInterface) {
                    $_validator->validate($subject, $spec);
                }
                elseif ($_validator instanceof ValidatorInterface) {
{'fraction_non_alphanumeric': 0.09194556822361162, 'fraction_numerical': 0.0, 'mean_word_length': 3.230171073094868, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '3624615', 'n_tokens_mistral': 709, 'n_tokens_neox': 690, 'n_words': 198}