<commit_before><?php declare(strict_types=1);

namespace WyriHaximus\React\ChildProcess\Closure;

use Closure;
use SuperClosure\Serializer;
use WyriHaximus\React\ChildProcess\Messenger\Messages\Factory;
use WyriHaximus\React\ChildProcess\Messenger\Messages\Rpc;

class MessageFactory
{
    const CLOSURE_EXECUTE = 'wyrihaximus.react.child-process.closure.child.execute';

    public static function rpc(Closure $closure, string $secret = null): Rpc
    {
        return Factory::rpc(
            self::CLOSURE_EXECUTE,
            [
                'closure' => (new Serializer(null, $secret))->serialize($closure),
            ]
        );
    }
}
<commit_msg>Marked message factory as final<commit_after><?php declare(strict_types=1);

namespace WyriHaximus\React\ChildProcess\Closure;

use Closure;
use SuperClosure\Serializer;
use WyriHaximus\React\ChildProcess\Messenger\Messages\Factory;
use WyriHaximus\React\ChildProcess\Messenger\Messages\Rpc;

final class MessageFactory
{
    const CLOSURE_EXECUTE = 'wyrihaximus.react.child-process.closure.child.execute';

    public static function rpc(Closure $closure, string $secret = null): Rpc
    {
        return Factory::rpc(
            self::CLOSURE_EXECUTE,
            [
                'closure' => (new Serializer(null, $secret))->serialize($closure),
            ]
        );
    }
}

{'fraction_non_alphanumeric': 0.11144130757800892, 'fraction_numerical': 0.0014858841010401188, 'mean_word_length': 3.3451612903225807, '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': '4403166', 'n_tokens_mistral': 439, 'n_tokens_neox': 420, 'n_words': 71}