<commit_before><?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;

/**
 * 通常の方法でサービスコンテナに突っ込む
 */
class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        $this->registerAuthDrivers();
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        /* Services */
        $this->app->bind('\App\Interfaces\Services\GitHubServiceInterface', function ($app) {
            $goutte = $app->make('\Goutte\Client');
            return new \App\Services\GitHubService($goutte);
        });
        $this->app->bind('\App\Interfaces\Services\UserServiceInterface', function ($app) {
            $userModel = $app->make('App\Interfaces\Models\UserModelInterface');
            return new \App\Services\UserService($userModel);
        });
        $this->app->bind('\App\Interfaces\Services\YoServiceInterface', function ($app) {
            return new \App\Services\YoService();
        });
        /* Models */
        $this->app->bind(\App\Interfaces\Models\UserModelInterface::class,
            \App\Models\UserModel::class
        );
        /* Libraries */
        $this->app->bind('\Goutte\Client', function ($app) {
            return new \Goutte\Client();
        });
    }

    /**
     * Register expanded auth driver
     */
    public function registerAuthDrivers()
    {
        $this->app['auth']->extend('github', function ($app) {
            $userModel = $app->make(\App\Interfaces\Models\UserModelInterface::class);
            return new \App\Authenticate\Driver\GitHubUserProvider(
                $userModel
            );
        });
    }
}
<commit_msg>modify: add model to service container<commit_after><?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;

/**
 * 通常の方法でサービスコンテナに突っ込む
 */
class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        $this->registerAuthDrivers();
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        /* Services */
        $this->app->bind('\App\Interfaces\Services\GitHubServiceInterface', function ($app) {
            $goutte = $app->make('\Goutte\Client');
            return new \App\Services\GitHubService($goutte);
        });
        $this->app->bind('\App\Interfaces\Services\UserServiceInterface', function ($app) {
            $userModel = $app->make('App\Interfaces\Models\UserModelInterface');
            return new \App\Services\UserService($userModel);
        });
        $this->app->bind('\App\Interfaces\Services\YoServiceInterface', function ($app) {
            return new \App\Services\YoService();
        });
        /* Models */
        $this->app->bind(
            \App\Interfaces\Models\UserModelInterface::class,
            \App\Models\UserModel::class
        );
        $this->app->bind(
            \App\Interfaces\Models\GitHubInfoModelInterface::class,
            \App\Models\GitHubInfoModel::class
        );
        /* Libraries */
        $this->app->bind('\Goutte\Client', function ($app) {
            return new \Goutte\Client();
        });
    }

    /**
     * Register expanded auth driver
     */
    public function registerAuthDrivers()
    {
        $this->app['auth']->extend('github', function ($app) {
            $userModel = $app->make(\App\Interfaces\Models\UserModelInterface::class);
            return new \App\Authenticate\Driver\GitHubUserProvider(
                $userModel
            );
        });
    }
}

{'fraction_non_alphanumeric': 0.1460883448642895, 'fraction_numerical': 0.0, 'mean_word_length': 2.091282894736842, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, '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': '1540876', 'n_tokens_mistral': 1084, 'n_tokens_neox': 1079, 'n_words': 165}