YandexSpellerServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 31
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 5 1
A register() 0 12 1
1
<?php
2
3
namespace Fecony\YandexSpeller\Providers;
4
5
use Fecony\YandexSpeller\YandexSpeller;
6
use Illuminate\Support\ServiceProvider;
7
8
class YandexSpellerServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     *
13
     * @return void
14
     */
15
    public function boot(): void
16
    {
17
        $this->publishes([
18
            __DIR__.'/../../config/yandex-speller.php' => config_path('yandex-speller.php'),
19
        ], 'yandex-speller');
20
    }
21
22
    /**
23
     * Register the application services.
24
     *
25
     * @return void
26
     */
27
    public function register(): void
28
    {
29
        $this->mergeConfigFrom(
30
            __DIR__.'/../../config/yandex-speller.php', 'yandex-speller'
31
        );
32
33
        $this->app->singleton('yandex-speller', function () {
34
            return new YandexSpeller();
35
        });
36
37
        $this->app->bind(YandexSpeller::class, function () {
38
            return new YandexSpeller();
39
        });
40
    }
41
}
42