<commit_before><?php

namespace ErrorReporter;

class ClientFactory
{
    private static $_instance = null;

    /**
     * @return ErrorHandler
     */
    private function __construct()
    {

    }

    /**
     * @return Client
     */
    public static function getInstance()
    {
        if(null === self::$_instance) {
            $config      = ConfigFactory::getInstance();
            $sender      = $config->options->sender->type;
            $senderClass = 'Corp\ErrorReporter\Sender\\' . $sender . 'Sender';

            if(empty($sender)) {
                throw new \Exception('You have to define a sender type');
            } elseif(!class_exists($senderClass)) {
                throw new \Exception('this sender type "' . $sender . '" does not exist');
            } else {
                $sender = new $senderClass($config);
            }
<commit_msg>Correction de la factory de sender<commit_after><?php

namespace ErrorReporter;

class ClientFactory
{
    private static $_instance = null;

    /**
     * @return ErrorHandler
     */
    private function __construct()
    {

    }

    /**
     * @return Client
     */
    public static function getInstance()
    {
        if(null === self::$_instance) {
            $config      = ConfigFactory::getInstance();
            $sender      = $config->options->sender->type;
            $senderClass = 'ErrorReporter\Sender\\' . $sender . 'Sender';

            if(empty($sender)) {
                throw new \Exception('You have to define a sender type');
            } elseif(!class_exists($senderClass)) {
                throw new \Exception('this sender type "' . $sender . '" does not exist');
            } else {
                $sender = new $senderClass($config);
            }

{'fraction_non_alphanumeric': 0.12883087400681045, 'fraction_numerical': 0.0, 'mean_word_length': 1.8389694041867954, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '4769042', 'n_tokens_mistral': 460, 'n_tokens_neox': 448, 'n_words': 113}