Passed
Push — master ( d7d8c0...c26592 )
by Mads
03:35
created

AuthServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
1
<?php
2
3
namespace Napp\Core\Api\Auth;
4
5
use Illuminate\Support\Facades\Auth;
6
use Illuminate\Support\ServiceProvider;
7
8
class AuthServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * @return void
12
     */
13
    public function register()
14
    {
15
        Auth::extend('api', function ($app, $name, array $config) {
16
            return new ApiGuard(Auth::createUserProvider($config['provider']), $app['request']);
17
        });
18
    }
19
}
20