<commit_before><?php
/**
 * This file belongs to the AnoynmFramework
 *
 * @author vahitserifsaglam <<EMAIL>>
 * @see http://gemframework.com
 *
 * Thanks for using
 */

namespace Anonym\Constructors;

use Anonym\Application\ServiceProvider;
use Anonym\Database\Base;
use Anonym\Database\Database;
use Anonym\Facades\App;
use Anonym\Facades\Config;
use Anonym\Support\Arr;

/**
 *
 * Class DatabaseConstructor
 * @package Anonym\Constructors
 */
class DatabaseConstructor extends ServiceProvider
{

    /**
     *  register the database base
     *
     */
    public function register()
    {

        $app = $this->app;

        if (true === $this->app['config']->get('database.autostart')) {

            $configs = Config::get('database');
            $connection = $configs['connection'];
            $connectionConfigs = Arr::get($configs['connections'], $connection, []);

            $base = new Base($connectionConfigs, $app);
            Database::setDatabaseApplication($base);

            $this->singleton(
                'database.base',
                function () {
                    return new Database();
                }
            );

            $this->singleton(Base::class, function () {
                return App::make('database.base');
            });

            Database::setDatabaseApplication($this->make('database.base'));

        }
    }
}<commit_msg>made some updates<commit_after><?php
/**
 * This file belongs to the AnoynmFramework
 *
 * @author vahitserifsaglam <<EMAIL>>
 * @see http://gemframework.com
 *
 * Thanks for using
 */

namespace Anonym\Constructors;

use Anonym\Application\ServiceProvider;
use Anonym\Database\Base;
use Anonym\Database\Database;
use Anonym\Facades\App;
use Anonym\Facades\Config;
use Anonym\Support\Arr;

/**
 *
 * Class DatabaseConstructor
 * @package Anonym\Constructors
 */
class DatabaseConstructor extends ServiceProvider
{

    /**
     *  register the database base
     *
     */
    public function register()
    {

        $app = $this->app;

        if (true === $this->app['config']->get('database.autostart')) {

            $configs = Config::get('database');
            $connection = $configs['connection'];
            $connectionConfigs = Arr::get($configs['connections'], $connection, []);

            $base = new Base($connectionConfigs, $app);
            Database::setDatabaseApplication($base);

            $this->singleton(
                'database.base',
                function () {
                    return new Database();
                }
            );

            $this->singleton(Base::class, function () {
                return App::make('database.base');
            });

            Database::setDatabaseApplication($base);

        }
    }
}
{'fraction_non_alphanumeric': 0.13871785584932994, 'fraction_numerical': 0.0, 'mean_word_length': 2.253239104829211, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 18, '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': '2882810', 'n_tokens_mistral': 763, 'n_tokens_neox': 737, 'n_words': 146}