<commit_before><?php

namespace Ridibooks\Platform\Common\DB;

use Doctrine\DBAL\Connection;
use Gnf\db\base;
use Gnf\db\PDO;
use Doctrine\DBAL\Configuration;
use Doctrine\DBAL\DriverManager;
use Ridibooks\Platform\Common\Cache\AdaptableCache;

class GnfConnectionProvider
{
    /**
     * @var \Doctrine\DBAL\Connection[]
     */
    private static $connection_pool = [];

    /**
     * @param $group_name
     *
     * @return PDO
     * @throws \Doctrine\DBAL\DBALException
     */
    public static function getConnection($group_name)
    {
        if (!isset(self::$connection_pool[$group_name])) {
            self::$connection_pool[$group_name] = self::createConnection($group_name);
        }

        return new PDO(self::$connection_pool[$group_name]);
    }

    /**
     * @param      $group_name
     * @param bool $is_auto_reconnect
     *
     * @return Connection
     * @throws \Doctrine\DBAL\DBALException
     */
    public static function getConnectionWithAutoReconnection($group_name, $is_auto_reconnect = false)
    {
        if (!isset(self::$connection_pool[$group_name])) {
            self::$connection_pool[$group_name] = self::createConnection($group_name);
        }
<commit_msg>GnfConnectionProvider - return type of connection - base in php-doc<commit_after><?php

namespace Ridibooks\Platform\Common\DB;

use Doctrine\DBAL\Connection;
use Gnf\db\base;
use Gnf\db\PDO;
use Doctrine\DBAL\Configuration;
use Doctrine\DBAL\DriverManager;
use Ridibooks\Platform\Common\Cache\AdaptableCache;

class GnfConnectionProvider
{
    /**
     * @var \Doctrine\DBAL\Connection[]
     */
    private static $connection_pool = [];

    /**
     * @param $group_name
     *
     * @return base
     * @throws \Doctrine\DBAL\DBALException
     */
    public static function getConnection($group_name)
    {
        if (!isset(self::$connection_pool[$group_name])) {
            self::$connection_pool[$group_name] = self::createConnection($group_name);
        }

        return new PDO(self::$connection_pool[$group_name]);
    }

    /**
     * @param      $group_name
     * @param bool $is_auto_reconnect
     *
     * @return Connection
     * @throws \Doctrine\DBAL\DBALException
     */
    public static function getConnectionWithAutoReconnection($group_name, $is_auto_reconnect = false)
    {
        if (!isset(self::$connection_pool[$group_name])) {
            self::$connection_pool[$group_name] = self::createConnection($group_name);
        }

{'fraction_non_alphanumeric': 0.12656692276587142, 'fraction_numerical': 0.0, 'mean_word_length': 3.1028192371475956, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4801390', 'n_tokens_mistral': 771, 'n_tokens_neox': 771, 'n_words': 123}