EventServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
A boot() 0 3 1
1
<?php
2
3
namespace mindtwo\LaravelMultilingual\Providers;
4
5
use mindtwo\LaravelMultilingual\Services\Locale;
6
use mindtwo\LaravelMultilingual\Listeners\LocaleChangedEventSubscriber;
7
use Illuminate\Foundation\Support\Providers\EventServiceProvider as IlluminateEventServiceProvider;
8
9
class EventServiceProvider extends IlluminateEventServiceProvider
10
{
11
    /**
12
     * The subscriber classes to register.
13
     *
14
     * @var array
15
     */
16
    protected $subscribe = [
17
        LocaleChangedEventSubscriber::class,
18
    ];
19
20
    /**
21
     * Register any other events for your application.
22
     */
23
    public function boot()
24
    {
25
        parent::boot();
26
    }
27
28
    /**
29
     * Register any application services.
30
     */
31
    public function register()
32
    {
33
        $this->app->singleton(Locale::class);
34
    }
35
}
36