Passed
Push — master ( 4c3e72...46eb59 )
by Arthur
10:39
created

Auth0ServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 18
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
    /**
20
     * Register any authentication / authorization services.
21
     *
22
     * @return void
23
     */
24 46
    public function register()
25
    {
26 46
        $this->app->register(\Auth0\Login\LoginServiceProvider::class);
27
28
        $this->app->bind(\Auth0\Login\Contract\Auth0UserRepository::class, function () {
29 24
            return new Auth0Service(new UserService());
30 46
        });
31
32
        $this->app->bind(Auth0ServiceContract::class, function () {
33 46
            return new Auth0Service(new UserService());
34 46
        });
35 46
    }
36
}
37