Completed
Push — master ( 098c1d...89670e )
by Jacob
02:08
created

ServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
ccs 8
cts 8
cp 1
rs 9.6666
cc 1
eloc 6
nc 1
nop 0
crap 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 15
    public function boot()
17
    {
18 15
        $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 15
        Auth::extend('jwt', function($app, $name, array $config) {
20 3
            $guard = new Guard($config['provider'], $app['request']);
21 3
            $app->refresh('request', $guard, 'setRequest');
22 3
            return $guard;
23 15
        });
24 15
    }
25
    /**
26
     * Register the service provider.
27
     *
28
     * @return void
29
     */
30 15
    public function register()
31
    {
32 15
    }
33
}
34