<commit_before><?php namespace Pingpong\Modules;

use Illuminate\Support\Str;
use Pingpong\Modules\Commands;
use Illuminate\Support\ServiceProvider;

class ModulesServiceProvider extends ServiceProvider {

    /**
     * Indicates if loading of the provider is deferred.
     *
     * @var bool
     */
    protected $defer = false;

    /**
     * Booting the package.
     *
     * @return void
     */
    public function boot()
    {
        $this->package('pingpong/modules');
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $this->registerServices();
        $this->registerCommands();
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    protected function registerServices()
    {
        $this->app->bindShared('modules.finder', function ($app)
        {
            $path = $app['config']->get('modules::paths.modules');

            return new Finder($path, $app['files']);
        });

        $this->app->bindShared('modules.repository', function ($app)
        {
            $path = $app['config']->get('modules::paths.modules');

            return new Repository($path, $app['files']);
        });

        $this->app->bindShared('modules', function ($app)
        {
            return new Module(
                $app['modules.finder'],
                $app['config'],
                $app['view'],
                $app['translator'],
                $app['files'],
                $app['html'],
                $app['url']
            );
        });

        $this->app->booting(function ($app)
        {
            $app['modules']->register();
        });
    }

    /**
     * Register "module:controller" command.
     */
    protected function registerControllerCommand()
    {<commit_msg>Update service provider<commit_after><?php namespace Pingpong\Modules;

use Illuminate\Support\Str;
use Pingpong\Modules\Commands;
use Illuminate\Support\ServiceProvider;
use Illuminate\Foundation\AliasLoader;

class ModulesServiceProvider extends ServiceProvider {

    /**
     * Indicates if loading of the provider is deferred.
     *
     * @var bool
     */
    protected $defer = false;

    /**
     * Booting the package.
     *
     * @return void
     */
    public function boot()
    {
        $this->package('pingpong/modules');

        $this->app['modules']->register();
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $this->registerServices();
        $this->registerCommands();
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    protected function registerServices()
    {
        $this->app->bindShared('modules', function ($app)
        {
            $path = $app['config']->get('modules::paths.modules');

            return new Repository($path, $app['files']);
        });
    }

    /**
     * Register "module:controller" command.
     */
    protected function registerControllerCommand()
    {
{'fraction_non_alphanumeric': 0.1433668504703211, 'fraction_numerical': 0.0, 'mean_word_length': 1.9204545454545454, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '3825706', 'n_tokens_mistral': 844, 'n_tokens_neox': 837, 'n_words': 170}