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

AccessKeyCredential::getAccessKeyId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace AlibabaCloud\Client\Credentials;
4
5
use AlibabaCloud\Client\Filter\CredentialFilter;
6
use AlibabaCloud\Client\Exception\ClientException;
7
8
/**
9
 * Use the AccessKey to complete the authentication.
10
 *
11
 * @package   AlibabaCloud\Client\Credentials
12
 */
13
class AccessKeyCredential implements CredentialsInterface
14
{
15
16
    /**
17
     * @var string
18
     */
19
    private $accessKeyId;
20
21
    /**
22
     * @var string
23
     */
24
    private $accessKeySecret;
25
26
    /**
27
     * AccessKeyCredential constructor.
28
     *
29
     * @param string $accessKeyId     Access key ID
30
     * @param string $accessKeySecret Access Key Secret
31
     *
32
     * @throws ClientException
33
     */
34 111
    public function __construct($accessKeyId, $accessKeySecret)
35
    {
36 111
        CredentialFilter::AccessKey($accessKeyId, $accessKeySecret);
37
38 103
        $this->accessKeyId     = $accessKeyId;
39 103
        $this->accessKeySecret = $accessKeySecret;
40 103
    }
41
42
    /**
43
     * @return string
44
     */
45 75
    public function getAccessKeyId()
46
    {
47 75
        return $this->accessKeyId;
48
    }
49
50
    /**
51
     * @return string
52
     */
53 73
    public function getAccessKeySecret()
54
    {
55 73
        return $this->accessKeySecret;
56
    }
57
58
    /**
59
     * @return string
60
     */
61 7
    public function __toString()
62
    {
63 7
        return "$this->accessKeyId#$this->accessKeySecret";
64
    }
65
}
66