<commit_before><?php

namespace  Bravist\Invitation;

use Illuminate\Support\ServiceProvider;

class InvitationProvider extends ServiceProvider
{
    /**
     * 延迟加载
     *
     * @var boolean
     */
    protected $defer = true;

    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        $this->setupConfig();
        $this->setupMigrations();
    }

    /**
     * Setup the config.
     *
     * @return void
     */
    protected function setupConfig()
    {
        $source = realpath(__DIR__ . '/config/invitation.php');
        $this->publishes([$path => config_path('invitation.php')], 'config');
        $this->mergeConfigFrom($path, 'invitation');
    }


    protected function setupMigrations()
    {
        $source = realpath(__DIR__ . "/migrations");

        $this->publishes([$source => database_path('migrations')], 'migrations');
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton(['Bravist\\Invitation' => 'invitation'], function($app){
            return new Invitation(config('letter'));
        });
    }


    /**
     * 提供的服务
     *
     * @return array
     */
    public function provides()
    {
        return ['invitation', 'WeiPei\\Invitation'];
    }
}<commit_msg>composer require bravist/invitation<commit_after><?php

namespace  Bravist\Invitation;

use Illuminate\Support\ServiceProvider;

class InvitationProvider extends ServiceProvider
{
    /**
     * 延迟加载
     *
     * @var boolean
     */
    protected $defer = true;

    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        $this->setupConfig();
        $this->setupMigrations();
    }

    /**
     * Setup the config.
     *
     * @return void
     */
    protected function setupConfig()
    {
        $path = realpath(__DIR__ . '/config/invitation.php');
        $this->publishes([$path => config_path('invitation.php')], 'config');
        $this->mergeConfigFrom($path, 'invitation');
    }


    protected function setupMigrations()
    {
        $source = realpath(__DIR__ . "/migrations");

        $this->publishes([$source => database_path('migrations')], 'migrations');
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton(['Bravist\\Invitation' => 'invitation'], function($app){
            return new Invitation(config('letter'));
        });
    }
}
{'fraction_non_alphanumeric': 0.14707008808885486, 'fraction_numerical': 0.0, 'mean_word_length': 2.1776155717761556, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '893945', 'n_tokens_mistral': 777, 'n_tokens_neox': 772, 'n_words': 143}