<commit_before><?php
namespace TypiCMS\Modules\Settings\Providers;

use Config;
use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
use Lang;
use Settings;
use TypiCMS\Modules\Settings\Models\Setting;
use TypiCMS\Modules\Settings\Repositories\CacheDecorator;
use TypiCMS\Modules\Settings\Repositories\EloquentSetting;
use TypiCMS\Services\Cache\LaravelCache;
use View;

class ModuleProvider extends ServiceProvider
{

    public function boot()
    {
        /**
         * Get configuration from DB and store it in the container
         */
        $TypiCMSConfig = $this->app->make('TypiCMS\Modules\Settings\Repositories\SettingInterface')
            ->allToArray();

        // merge config
        $config = $this->app['config']->get('typicms', []);
        $this->app['config']->set('typicms', array_merge($TypiCMSConfig, $config));


        $this->loadViewsFrom(__DIR__ . '/../resources/views/', 'settings');
        $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'settings');

        $this->publishes([
            __DIR__ . '/../resources/views' => base_path('resources/views/vendor/settings'),
        ], 'views');
        $this->publishes([
            __DIR__ . '/../database' => base_path('database'),
        ], 'migrations');
    }

    public function register()
    {

        $app = $this->app;

        /**
         * Register route service provider
         */
        $app->register('TypiCMS\Modules\Settings\Providers\RouteServiceProvider');

        $app->bind('TypiCMS\Modules\Settings\Repositories\SettingInterface', function (Application $app) {
            $repository = new EloquentSetting(new Setting);
            if (! Config::get('app.cache')) {
                return $repository;
            }
            $laravelCache = new LaravelCache($app['cache'], 'settings', 10);

            return new CacheDecorator($repository, $laravelCache);
        });

    }
}<commit_msg>Update ModuleProvider.php<commit_after><?php
namespace TypiCMS\Modules\Settings\Providers;

use Config;
use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
use Lang;
use Settings;
use TypiCMS\Modules\Settings\Models\Setting;
use TypiCMS\Modules\Settings\Repositories\CacheDecorator;
use TypiCMS\Modules\Settings\Repositories\EloquentSetting;
use TypiCMS\Services\Cache\LaravelCache;
use View;

class ModuleProvider extends ServiceProvider
{

    public function boot()
    {
        /**
         * Get configuration from DB and store it in the container
         */
        $TypiCMSConfig = $this->app->make('TypiCMS\Modules\Settings\Repositories\SettingInterface')
            ->allToArray();

        // merge config
        $config = $this->app['config']->get('typicms', []);
        $this->app['config']->set('typicms', array_merge($TypiCMSConfig, $config));


        $this->loadViewsFrom(__DIR__ . '/../resources/views/', 'settings');
        $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'settings');

        $this->publishes([
            __DIR__ . '/../resources/views' => base_path('resources/views/vendor/settings'),
        ], 'views');
        $this->publishes([
            __DIR__ . '/../database' => base_path('database'),
        ], 'migrations');
    }

    public function register()
    {

        $app = $this->app;

        /**
         * Register route service provider
         */
        $app->register('TypiCMS\Modules\Settings\Providers\RouteServiceProvider');

        $app->bind('TypiCMS\Modules\Settings\Repositories\SettingInterface', function (Application $app) {
            $repository = new EloquentSetting(new Setting);
            if (! config('typicms.cache')) {
                return $repository;
            }
            $laravelCache = new LaravelCache($app['cache'], 'settings', 10);

            return new CacheDecorator($repository, $laravelCache);
        });

    }
}
{'fraction_non_alphanumeric': 0.14571062740076823, 'fraction_numerical': 0.001024327784891165, 'mean_word_length': 2.7235462345090564, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, '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': '4870400', 'n_tokens_mistral': 1131, 'n_tokens_neox': 1099, 'n_words': 195}