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

Auth0ServiceProvider::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 10
ccs 5
cts 5
cp 1
crap 1
rs 10
c 0
b 0
f 0
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