<commit_before><?php

namespace siestaphp;

use siestaphp\driver\ConnectionData;
use siestaphp\driver\ConnectionFactory;
use siestaphp\driver\exceptions\ConnectException;
use siestaphp\exceptions\InvalidConfiguration;
use siestaphp\generator\GeneratorConfig;
use siestaphp\generator\ReverseGeneratorConfig;
use siestaphp\util\File;
use siestaphp\util\Util;

/**
 * Class Config
 * @package siestaphp
 */
class Config
{

    const CONFIG_FILE_NAME = "siesta.config.json";

    const CONFIG_CONNECTION = "connection";

    const CONFIG_GENERATOR = "generator";

    const CONFIG_REVERSE_GENERATOR = "reverse";

    const CONFIG_CONNECTION_POST_CONNECT = "postConnectStatementList";

    const EXCEPTION_NO_CONFIG = "found no config file in %s I searched for %s";

    const EXCEPTION_MISSING_CONNECTION = "found no %s array";

    /**
     * @var Config
     */
    private static $instance;

    /**
     * @param string $configFileName
     *
     * @return Config
     * @throws InvalidConfiguration
     * @throws ConnectException
     */
    public static function getInstance($configFileName)
    {
        if (self::$instance === null) {
            self::$instance = new Config($configFileName);
            self::$instance->configureConnections();
        }
        return self::$instance;
    }

    /**
     *
     */
    public static function reset() {
        self::$instance = null;
    }

    /**<commit_msg>config<commit_after><?php

namespace siestaphp;

use siestaphp\driver\ConnectionData;
use siestaphp\driver\ConnectionFactory;
use siestaphp\driver\exceptions\ConnectException;
use siestaphp\exceptions\InvalidConfiguration;
use siestaphp\generator\GeneratorConfig;
use siestaphp\generator\ReverseGeneratorConfig;
use siestaphp\util\File;
use siestaphp\util\Util;

/**
 * Class Config
 * @package siestaphp
 */
class Config
{

    const CONFIG_FILE_NAME = "siesta.config.json";

    const CONFIG_CONNECTION = "connection";

    const CONFIG_GENERATOR = "generator";

    const CONFIG_REVERSE_GENERATOR = "reverse";

    const CONFIG_CONNECTION_POST_CONNECT = "postConnectStatementList";

    const EXCEPTION_NO_CONFIG = "found no config file in %s I searched for %s";

    const EXCEPTION_MISSING_CONNECTION = "found no %s array";

    /**
     * @var Config
     */
    private static $instance;

    /**
     * @param string $configFileName
     *
     * @return Config
     * @throws InvalidConfiguration
     * @throws ConnectException
     */
    public static function getInstance($configFileName = null)
    {
        if (self::$instance === null) {
            self::$instance = new Config($configFileName);
            self::$instance->configureConnections();
        }
        return self::$instance;
    }

    /**
     *
     */
    public static function reset() {
        self::$instance = null;
    }

    /**
{'fraction_non_alphanumeric': 0.10583684950773559, 'fraction_numerical': 0.0, 'mean_word_length': 3.1053391053391053, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6926431', 'n_tokens_mistral': 839, 'n_tokens_neox': 826, 'n_words': 183}