Completed
Pull Request — master (#38)
by Brian
33:19 queued 23:14
created

LaravelServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 8 1
1
<?php
2
3
namespace SocialiteProviders\Manager\Providers;
4
5
use Illuminate\Contracts\Events\Dispatcher;
6
use Laravel\Socialite\SocialiteServiceProvider;
7
use SocialiteProviders\Manager\Contracts\Helpers\ConfigRetrieverInterface;
8
use SocialiteProviders\Manager\Helpers\ConfigRetriever;
9
use SocialiteProviders\Manager\SocialiteWasCalled;
10
11
class LaravelServiceProvider extends SocialiteServiceProvider
12
{
13
    /**
14
     * @param Dispatcher         $event
15
     * @param SocialiteWasCalled $socialiteWasCalled
16
     */
17
    public function boot(Dispatcher $event, SocialiteWasCalled $socialiteWasCalled)
18
    {
19
        $event->fire($socialiteWasCalled);
20
    }
21
22
    public function register()
23
    {
24
        parent::register();
25
26
        $this->app->singleton(ConfigRetrieverInterface::class, function () {
27
            return new ConfigRetriever();
28
        });
29
    }
30
}
31