Passed
Push — ft/appmove ( db87fd...97613e )
by Philippe
45:05 queued 26:47
created

AuthServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 13
c 0
b 0
f 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
1
<?php
2
3
namespace Thinktomorrow\Chief\App\Providers;
4
5
use Thinktomorrow\Chief\Authorization\ChiefUserProvider;
6
use Illuminate\Support\Facades\Auth;
7
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
8
9
class AuthServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Register any authentication / authorization services.
13
     *
14
     * @return void
15
     */
16
    public function boot()
17
    {
18
        $this->registerPolicies();
19
20
        Auth::provider('chief-eloquent', function ($app, array $config) {
21
            return new ChiefUserProvider($app['hash'], $config['model']);
22
        });
23
    }
24
}
25