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.

CommunityOAuth::getUser()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 6

Duplication

Lines 10
Ratio 100 %

Importance

Changes 0
Metric Value
dl 10
loc 10
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 6
nc 2
nop 2
1
<?php
2
3
namespace BlizzardApi\Service;
4
5
use Psr\Http\Message\ResponseInterface;
6
7
/**
8
 * Class CommunityOAuth
9
 *
10
 * @author Oleg Kachinsky <[email protected]>
11
 */
12
class CommunityOAuth extends Service
13
{
14
    // region Account API
15
16
    /**
17
     * Get user
18
     *
19
     * Returns the account information of a user
20
     *
21
     * @param null|string $accessToken Authorized user access token
22
     * @param array       $options     Options
23
     *
24
     * @return ResponseInterface
25
     */
26 View Code Duplication
    public function getUser($accessToken = null, array $options = [])
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
27
    {
28
        if (null === $accessToken) {
29
            $options['access_token'] = $this->blizzardClient->getAccessToken();
30
        } else {
31
            $options['access_token'] = $accessToken;
32
        }
33
34
        return $this->request('/account/user', $options);
35
    }
36
37
    // endregion Account API
38
}
39