TranslugServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace JellyBool\Translug;
4
5
use GuzzleHttp\Client;
6
use Illuminate\Support\ServiceProvider;
7
8
class TranslugServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Indicates if loading of the provider is deferred.
12
     *
13
     * @var bool
14
     */
15
    protected $defer = false;
16
17
    /**
18
     * Bootstrap the application services.
19
     *
20
     * @return void
21
     */
22
    public function boot()
23
    {
24
        //
25
    }
26
27
    /**
28
     * Register the application services.
29
     *
30
     * @return void
31
     */
32
    public function register()
33
    {
34
        $this->app->singleton('translug', function () {
35
            return new Translation(new Client(), config('services.youdao'));
36
        });
37
    }
38
}
39