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.

DefaultProfile   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 57
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getRamRoleArnProfile() 0 4 1
A getBearerTokenProfile() 0 4 1
A getProfile() 0 4 1
A getEcsRamRoleProfile() 0 4 1
1
<?php
2
3
namespace AlibabaCloud\Client\Profile;
4
5
use AlibabaCloud\Client\AlibabaCloud;
6
use AlibabaCloud\Client\Clients\Client;
7
use AlibabaCloud\Client\Exception\ClientException;
8
9
/**
10
 * Class DefaultProfile
11
 *
12
 * @package    AlibabaCloud\Client\Profile
13
 * @codeCoverageIgnore
14
 * @deprecated deprecated since version 2.0, Use AlibabaCloud instead.
15
 */
16
class DefaultProfile
17
{
18
19
    /**
20
     * @param string $regionId
21
     * @param string $accessKeyId
22
     * @param string $accessKeySecret
23
     *
24
     * @return Client
25
     * @throws ClientException
26
     */
27
    public static function getProfile($regionId, $accessKeyId, $accessKeySecret)
28
    {
29
        return AlibabaCloud::accessKeyClient($accessKeyId, $accessKeySecret)
30
                           ->regionId($regionId);
31
    }
32
33
    /**
34
     * @param string $regionId
35
     * @param string $accessKeyId
36
     * @param string $accessKeySecret
37
     * @param string $roleArn
38
     * @param string $roleSessionName
39
     *
40
     * @return Client
41
     * @throws ClientException
42
     */
43
    public static function getRamRoleArnProfile($regionId, $accessKeyId, $accessKeySecret, $roleArn, $roleSessionName)
44
    {
45
        return AlibabaCloud::ramRoleArnClient($accessKeyId, $accessKeySecret, $roleArn, $roleSessionName)
46
                           ->regionId($regionId);
47
    }
48
49
    /**
50
     * @param string $regionId
51
     * @param string $roleName
52
     *
53
     * @return Client
54
     * @throws ClientException
55
     */
56
    public static function getEcsRamRoleProfile($regionId, $roleName)
57
    {
58
        return AlibabaCloud::ecsRamRoleClient($roleName)
59
                           ->regionId($regionId);
60
    }
61
62
    /**
63
     * @param string $regionId
64
     * @param string $bearerToken
65
     *
66
     * @return Client
67
     * @throws ClientException
68
     */
69
    public static function getBearerTokenProfile($regionId, $bearerToken)
70
    {
71
        return AlibabaCloud::bearerTokenClient($bearerToken)
72
                           ->regionId($regionId);
73
    }
74
}
75