<commit_before><?php

namespace Validation\Schema;

use Validation\InputValue;
use Validation\ValidationException;

class AlternativeSchema extends AbstractSchema
{
    /**
     * @param array $assertions
     */
    public function __construct(array $assertions)
    {
        $this->assertAll($assertions);
    }

    /**
     * @param InputValue $input
     * @return mixed
     * @throws ValidationException
     */
    public function process(InputValue $input)
    {
        foreach ($this->assertions() as $assertion) {
            try {
                $assertion->process($input);
                return $input->getValue();
            } catch (ValidationException $e) {
            }
        }


        throw new ValidationException('none of the alternatives matched');
    }
}
<commit_msg>cs fix<commit_after><?php

namespace Validation\Schema;

use Validation\InputValue;
use Validation\ValidationException;

class AlternativeSchema extends AbstractSchema
{
    /**
     * @param array $assertions
     */
    public function __construct(array $assertions)
    {
        $this->assertAll($assertions);
    }

    /**
     * @param InputValue $input
     * @return mixed
     * @throws ValidationException
     */
    public function process(InputValue $input)
    {
        foreach ($this->assertions() as $assertion) {
            try {
                $assertion->process($input);
                return $input->getValue();
            } catch (ValidationException $e) {
            }
        }

        throw new ValidationException('none of the alternatives matched');
    }
}

{'fraction_non_alphanumeric': 0.10664993726474278, 'fraction_numerical': 0.0, 'mean_word_length': 2.2222222222222223, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '5990712', 'n_tokens_mistral': 423, 'n_tokens_neox': 403, 'n_words': 97}