GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

OAuthManager   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 35
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A authorize() 0 4 1
A login() 0 5 1
A loginForever() 0 5 1
A registerProvider() 0 4 1
1
<?php namespace AdamWathan\EloquentOAuth;
2
3
class OAuthManager
4
{
5
    protected $redirect;
6
    protected $authenticator;
7
    protected $socialnorm;
8
9
    public function __construct($redirect, $authenticator, $socialnorm)
10
    {
11
        $this->redirect = $redirect;
12
        $this->authenticator = $authenticator;
13
        $this->socialnorm = $socialnorm;
14
    }
15
16
    public function authorize($providerAlias)
17
    {
18
        return $this->redirect->to($this->socialnorm->authorize($providerAlias));
19
    }
20
21
    public function login($providerAlias, $callback = null)
22
    {
23
        $details = $this->socialnorm->getUser($providerAlias);
24
        return $this->authenticator->login($providerAlias, $details, $callback, $remember = false);
25
    }
26
27
    public function loginForever($providerAlias, $callback = null)
28
    {
29
        $details = $this->socialnorm->getUser($providerAlias);
30
        return $this->authenticator->login($providerAlias, $details, $callback, $remember = true);
31
    }
32
33
    public function registerProvider($alias, $provider)
34
    {
35
        $this->socialnorm->registerProvider($alias, $provider);
36
    }
37
}
38