Auth0ServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 17
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 10 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: arthur
5
 * Date: 13.10.18
6
 * Time: 20:49.
7
 */
8
9
namespace Modules\Auth0\Providers;
10
11
use Illuminate\Support\ServiceProvider;
12
use Modules\Auth0\Contracts\Auth0ServiceContract;
13
use Modules\Auth0\Services\Auth0Service;
14
use Modules\User\Services\UserService;
15
16
class Auth0ServiceProvider extends ServiceProvider
17
{
18
    /**
19
     * Register any authentication / authorization services.
20
     *
21
     * @return void
22
     */
23 43
    public function register()
24
    {
25 43
        $this->app->register(\Auth0\Login\LoginServiceProvider::class);
26
27
        $this->app->bind(\Auth0\Login\Contract\Auth0UserRepository::class, function () {
28 43
            return new Auth0Service(new UserService());
29 43
        });
30
31
        $this->app->bind(Auth0ServiceContract::class, function () {
32 43
            return new Auth0Service(new UserService());
33 43
        });
34 43
    }
35
}
36