TranslugServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
dl 0
loc 31
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 6 1
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