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.
Passed
Push — master ( 2d0137...54f172 )
by Yong
12:14 queued 08:03
created

BearerTokenCredential   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 52
ccs 12
cts 12
cp 1
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getAccessKeySecret() 0 3 1
A getAccessKeyId() 0 3 1
A getBearerToken() 0 3 1
A __toString() 0 3 1
1
<?php
2
3
namespace AlibabaCloud\Client\Credentials;
4
5
use AlibabaCloud\Client\Filter\CredentialFilter;
6
use AlibabaCloud\Client\Exception\ClientException;
7
8
/**
9
 * Class BearerTokenCredential
10
 *
11
 * @package   AlibabaCloud\Client\Credentials
12
 */
13
class BearerTokenCredential implements CredentialsInterface
14
{
15
16
    /**
17
     * @var string
18
     */
19
    private $bearerToken;
20
21
    /**
22
     * Class constructor.
23
     *
24
     * @param string $bearerToken
25
     *
26
     * @throws ClientException
27
     */
28 23
    public function __construct($bearerToken)
29
    {
30 23
        CredentialFilter::bearerToken($bearerToken);
31
32 19
        $this->bearerToken = $bearerToken;
33 19
    }
34
35
    /**
36
     * @return string
37
     */
38 14
    public function getBearerToken()
39
    {
40 14
        return $this->bearerToken;
41
    }
42
43
    /**
44
     * @return string
45
     */
46 13
    public function getAccessKeyId()
47
    {
48 13
        return '';
49
    }
50
51
    /**
52
     * @return string
53
     */
54 13
    public function getAccessKeySecret()
55
    {
56 13
        return '';
57
    }
58
59
    /**
60
     * @return string
61
     */
62 4
    public function __toString()
63
    {
64 4
        return "bearerToken#$this->bearerToken";
65
    }
66
}
67