GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

LaravelLocalizationServiceProvider   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 70
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 3
dl 0
loc 70
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
A provides() 0 4 1
A register() 0 12 1
A registerBindings() 0 8 1
A registerCommands() 0 12 1
1
<?php
2
3
namespace Mcamara\LaravelLocalization;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class LaravelLocalizationServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application events.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        $this->publishes([
17
            __DIR__.'/../../config/config.php' => config_path('laravellocalization.php'),
18
        ], 'config');
19
    }
20
21
    /**
22
     * Get the services provided by the provider.
23
     *
24
     * @return array
25
     */
26
    public function provides()
27
    {
28
        return ['modules.handler', 'modules'];
29
    }
30
31
    /**
32
     * Register the service provider.
33
     *
34
     * @return void
35
     */
36
    public function register()
37
    {
38
        $packageConfigFile = __DIR__.'/../../config/config.php';
39
40
        $this->mergeConfigFrom(
41
            $packageConfigFile, 'laravellocalization'
42
        );
43
44
        $this->registerBindings();
45
46
        $this->registerCommands();
47
    }
48
49
    /**
50
     * Registers app bindings and aliases.
51
     */
52
    protected function registerBindings()
53
    {
54
        $this->app->singleton(LaravelLocalization::class, function () {
55
            return new LaravelLocalization();
56
        });
57
58
        $this->app->alias(LaravelLocalization::class, 'laravellocalization');
59
    }
60
61
    /**
62
     * Registers route caching commands.
63
     */
64
    protected function registerCommands()
65
    {
66
        $this->app->singleton('laravellocalizationroutecache.cache', Commands\RouteTranslationsCacheCommand::class);
67
        $this->app->singleton('laravellocalizationroutecache.clear', Commands\RouteTranslationsClearCommand::class);
68
        $this->app->singleton('laravellocalizationroutecache.list', Commands\RouteTranslationsListCommand::class);
69
70
        $this->commands([
71
            'laravellocalizationroutecache.cache',
72
            'laravellocalizationroutecache.clear',
73
            'laravellocalizationroutecache.list',
74
        ]);
75
    }
76
}
77