Completed
Push — development ( b7987d...8c0e57 )
by Claudio
05:33
created

AuthServiceProvider::auth()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace App\Providers;
4
5
use App\Helpers\User;
6
use Illuminate\Support\ServiceProvider;
7
8
/**
9
 * Class AuthServiceProvider
10
 * @package App\Providers
11
 */
12
class AuthServiceProvider extends ServiceProvider
13
{
14
    /**
15
     * Boot the authentication services for the application.
16
     * If an User is stored in the Session recover it
17
     * Only will recover if the Path() isn't the Authentcation Path
18
     *
19
     * @return void
20
     */
21
    public function boot()
22
    {
23
        $this->app['auth']->viaRequest('api', function ($request) {
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
24
            return User::getInstance()->getSession();
25
        });
26
    }
27
}
28