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::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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