Completed
Push — api/develop ( 67b89b...086d67 )
by Bertrand
11:33 queued 57s
created

JWTServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the HRis Software package.
5
 *
6
 * NOTICE OF LICENSE
7
 *
8
 * Licensed under the 3-clause BSD License.
9
 *
10
 * This source file is subject to the 3-clause BSD License that is
11
 * bundled with this package in the LICENSE file.
12
 *
13
 * @version    alpha
14
 *
15
 * @author     Bertrand Kintanar <[email protected]>
16
 * @license    BSD License (3-clause)
17
 * @copyright  (c) 2014-2016, b8 Studios, Ltd
18
 *
19
 * @link       http://github.com/HB-Co/HRis
20
 */
21
22
namespace HRis\Providers;
23
24
use Dingo\Api\Auth\Auth;
25
use Dingo\Api\Auth\Provider\JWT;
26
use Illuminate\Support\ServiceProvider;
27
28
class JWTServiceProvider extends ServiceProvider
29
{
30
    /**
31
     * Bootstrap the application services.
32
     *
33
     * @return void
34
     */
35
    public function boot()
36
    {
37 204
        $this->app[Auth::class]->extend('jwt', function ($app) {
38 204
            return new JWT($app['Tymon\JWTAuth\JWTAuth']);
39 204
        });
40 204
    }
41
42
    /**
43
     * Register the application services.
44
     *
45
     * @return void
46
     */
47 204
    public function register()
48
    {
49
        //
50 204
    }
51
}
52