AuthManager   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 27
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A createEloquentDriver() 0 6 1
1
<?php
2
3
namespace App\Auth;
4
5
use Facebook\FacebookSession;
6
use Illuminate\Support\Facades\Config;
7
use Illuminate;
8
9
/**
10
 * Class AuthManager
11
 * @package App\Auth
12
 */
13
class AuthManager extends Illuminate\Auth\AuthManager
14
{
15
    /**
16
     * Create a new manager instance.
17
     * AuthManager constructor.
18
     * @param Illuminate\Foundation\Application $app
19
     */
20
    public function __construct($app)
21
    {
22
        parent::__construct($app);
23
24
        FacebookSession::setDefaultApplication(
25
            Config::get('auth.providers.facebook.app_id'),
26
            Config::get('auth.providers.facebook.app_secret')
27
        );
28
    }
29
30
    /**
31
     * @inheritdoc
32
     */
33
    public function createEloquentDriver()
34
    {
35
        $provider = $this->createEloquentProvider((array)config());
36
37
        return new Guard($provider, $this->app['session.store']);
0 ignored issues
show
Unused Code introduced by
The call to Guard::__construct() has too many arguments starting with $provider.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
38
    }
39
}
40