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

StsCredential::getAccessKeySecret()   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 STS Token to complete the authentication.
10
 *
11
 * @package   AlibabaCloud\Client\Credentials
12
 */
13
class StsCredential implements CredentialsInterface
14
{
15
16
    /**
17
     * @var string
18
     */
19
    private $accessKeyId;
20
21
    /**
22
     * @var string
23
     */
24
    private $accessKeySecret;
25
26
    /**
27
     * @var string
28
     */
29
    private $securityToken;
30
31
    /**
32
     * StsCredential constructor.
33
     *
34
     * @param string $accessKeyId     Access key ID
35
     * @param string $accessKeySecret Access Key Secret
36
     * @param string $securityToken   Security Token
37
     *
38
     * @throws ClientException
39
     */
40 21
    public function __construct($accessKeyId, $accessKeySecret, $securityToken = '')
41
    {
42 21
        CredentialFilter::AccessKey($accessKeyId, $accessKeySecret);
43
44 13
        $this->accessKeyId     = $accessKeyId;
45 13
        $this->accessKeySecret = $accessKeySecret;
46 13
        $this->securityToken   = $securityToken;
47 13
    }
48
49
    /**
50
     * @return string
51
     */
52 5
    public function getAccessKeyId()
53
    {
54 5
        return $this->accessKeyId;
55
    }
56
57
    /**
58
     * @return string
59
     */
60 6
    public function getAccessKeySecret()
61
    {
62 6
        return $this->accessKeySecret;
63
    }
64
65
    /**
66
     * @return string
67
     */
68 4
    public function getSecurityToken()
69
    {
70 4
        return $this->securityToken;
71
    }
72
73
    /**
74
     * @return string
75
     */
76 4
    public function __toString()
77
    {
78 4
        return "$this->accessKeyId#$this->accessKeySecret#$this->securityToken";
79
    }
80
}
81