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.
Test Setup Failed
Push — master ( 500279...2f8c13 )
by
unknown
02:35
created

Credential   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A getSecretCode() 0 15 3
1
<?php
2
/**
3
 * This file is part of the O2System Framework package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @author         Steeve Andrian Salim
9
 * @copyright      Copyright (c) Steeve Andrian Salim
10
 */
11
12
// ------------------------------------------------------------------------
13
14
namespace O2System\Security\Authentication\Oauth\Client;
15
16
// ------------------------------------------------------------------------
17
18
use O2System\Security\Authentication\Oauth;
19
20
/**
21
 * Class Credential
22
 * @package O2System\Security\Authentication\Oauth\Client
23
 */
24
class Credential
25
{
26
    /**
27
     * Credential::getSecretCode
28
     *
29
     * @param \O2System\Security\Authentication\Oauth\Client\Account $client
30
     * @param array                                                  $options
31
     */
32
    public function getSecretCode(Oauth\Client\Account $client, array $options = [])
33
    {
34
        $scope = $this->config[ 'scope' ];
0 ignored issues
show
Bug Best Practice introduced by
The property config does not exist on O2System\Security\Authen...Oauth\Client\Credential. Did you maybe forget to declare it?
Loading history...
35
        if (isset($options[ 'scope' ])) {
36
            if (is_array($options[ 'scope' ])) {
37
                $scope = array_merge($scope, $options[ 'scope' ]);
38
            }
39
        }
40
41
        $params = [
0 ignored issues
show
Unused Code introduced by
The assignment to $params is dead and can be removed.
Loading history...
42
            'scope'         => $scope,
43
            'state'         => $this->state,
0 ignored issues
show
Bug Best Practice introduced by
The property state does not exist on O2System\Security\Authen...Oauth\Client\Credential. Did you maybe forget to declare it?
Loading history...
44
            'client_id'     => $client->id,
0 ignored issues
show
Bug Best Practice introduced by
The property id does not exist on O2System\Security\Authen...on\Oauth\Client\Account. Since you implemented __get, consider adding a @property annotation.
Loading history...
45
            'redirect_uri'  => $this->redirect_uri,
0 ignored issues
show
Bug Best Practice introduced by
The property redirect_uri does not exist on O2System\Security\Authen...Oauth\Client\Credential. Did you maybe forget to declare it?
Loading history...
46
            'response_type' => $this->response_type,
0 ignored issues
show
Bug Best Practice introduced by
The property response_type does not exist on O2System\Security\Authen...Oauth\Client\Credential. Did you maybe forget to declare it?
Loading history...
47
        ];
48
    }
49
50
    // ------------------------------------------------------------------------
51
}