ServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 22
ccs 10
cts 10
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 9 1
A register() 0 3 1
1
<?php
2
/**
3
 * @copyright Copyright (c) 2016 Canis.io
4
 * @license   MIT
5
 */
6
7
namespace Canis\Lumen\Jwt;
8
9
use Auth;
10
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
11
12
class ServiceProvider extends BaseServiceProvider
13
{
14
    private $jwt;
0 ignored issues
show
Unused Code introduced by
The property $jwt is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
15
16 52
    public function boot()
17
    {
18 52
        $this->app->configure('jwt');
0 ignored issues
show
Bug introduced by
The method configure() does not exist on Illuminate\Contracts\Foundation\Application. Did you maybe mean registerConfiguredProviders()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
19 52
        Auth::extend('jwt', function($app, $name, array $config) {
20 3
            $guard = new Guard($name, Auth::createUserProvider($config['provider']), $app['request'], $config);
21 3
            $app->refresh('request', $guard, 'setRequest');
22 3
            return $guard;
23 52
        });
24 52
    }
25
    /**
26
     * Register the service provider.
27
     *
28
     * @return void
29
     */
30 52
    public function register()
31
    {
32 52
    }
33
}
34