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   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 51
ccs 11
cts 11
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A getAccessKeySecret() 0 3 1
A __construct() 0 6 1
A getAccessKeyId() 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
 * 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