<commit_before><?php

declare(strict_types=1);

namespace App\Generators;

/**
 * This is the multi generator class.
 *
 * @author <NAME> <<EMAIL>>
 */
class MultiGenerator implements GeneratorInterface
{
    /**
     * The generator to wrap.
     *
     * @var \App\Generators\GeneratorInterface
     */
    protected $generator;

    /**
     * The number of generations.
     *
     * @var int
     */
    protected $times;

    /**
     * Create a new multi generator instance.
     *
     * @param \App\Generators\GeneratorInterface $generator
     * @param int                                $times
     *
     * @return void
     */
    public function __construct(GeneratorInterface $generator, int $times = 3)
    {
        $this->generator = $generator;
        $this->times = $times;
    }

    /**
     * Start the meme generation.
     *
     * @param string $text
     *
     * @throws \App\Generators\ExceptionInterface
     *
     * @return \App\Generators\Promise
     */
    public function start(string $text)
    {
        app('Psr\Log\LoggerInterface')->debug('Entering multi gen main');

        return new Promise(function () use ($text) {
            app('Psr\Log\LoggerInterface')->debug('Entering multi gen wait');

            $results = [];

            for ($i = 0; $i < $this->times; $i++) {
                $results[] = $this->generator->start($text);
            }

            $images = [];

            foreach ($results as $result) {
                app('Psr\Log\LoggerInterface')->debug('Entering multi gen loop');
                $images += $result->wait();
            }

            return $images;
        });
    }
}
<commit_msg>Fixed merging<commit_after><?php

declare(strict_types=1);

namespace App\Generators;

/**
 * This is the multi generator class.
 *
 * @author <NAME> <<EMAIL>>
 */
class MultiGenerator implements GeneratorInterface
{
    /**
     * The generator to wrap.
     *
     * @var \App\Generators\GeneratorInterface
     */
    protected $generator;

    /**
     * The number of generations.
     *
     * @var int
     */
    protected $times;

    /**
     * Create a new multi generator instance.
     *
     * @param \App\Generators\GeneratorInterface $generator
     * @param int                                $times
     *
     * @return void
     */
    public function __construct(GeneratorInterface $generator, int $times = 3)
    {
        $this->generator = $generator;
        $this->times = $times;
    }

    /**
     * Start the meme generation.
     *
     * @param string $text
     *
     * @throws \App\Generators\ExceptionInterface
     *
     * @return \App\Generators\Promise
     */
    public function start(string $text)
    {
        app('Psr\Log\LoggerInterface')->debug('Entering multi gen main');

        return new Promise(function () use ($text) {
            app('Psr\Log\LoggerInterface')->debug('Entering multi gen wait');

            $results = [];

            for ($i = 0; $i < $this->times; $i++) {
                $results[] = $this->generator->start($text);
            }

            $images = [];

            foreach ($results as $result) {
                app('Psr\Log\LoggerInterface')->debug('Entering multi gen loop');
                $images = array_merge($images, $result->wait());
            }

            return $images;
        });
    }
}

{'fraction_non_alphanumeric': 0.13716155905980362, 'fraction_numerical': 0.0017851829812555787, 'mean_word_length': 1.7900414937759337, 'pattern_counts': {'":': 0, '<': 13, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4101858', 'n_tokens_mistral': 955, 'n_tokens_neox': 923, 'n_words': 218}