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.
Completed
Push — master ( f20fbc...7f6b56 )
by Oleg
02:14
created

CommunityOAuth::getUser()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 6

Duplication

Lines 10
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 10
loc 10
rs 9.4286
cc 2
eloc 6
nc 2
nop 2
1
<?php
2
3
namespace BlizzardApi\Service;
4
5
use GuzzleHttp\Client;
6
use GuzzleHttp\Psr7\Response;
7
8
/**
9
 * Class CommunityOAuth
10
 *
11
 * @author Oleg Kachinsky <[email protected]>
12
 */
13
class CommunityOAuth extends Service
14
{
15
    // region Account API
16
17
    /**
18
     * Get user
19
     *
20
     * Returns the account information of a user
21
     *
22
     * @param null|string $accessToken Authorized user access token
23
     * @param array       $options     Options
24
     *
25
     * @return Response
26
     */
27 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...
28
    {
29
        if (null === $accessToken) {
30
            $options['access_token'] = $this->blizzardClient->getAccessToken();
31
        } else {
32
            $options['access_token'] = $accessToken;
33
        }
34
35
        return $this->request('/account/user', $options);
36
    }
37
38
    // endregion Account API
39
}
40