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 ( 67f805...b5a444 )
by Yong
04:14
created

RequestTrait::userAgentAppend()   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 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace AlibabaCloud\Client\Traits;
4
5
use AlibabaCloud\Client\AlibabaCloud;
6
use AlibabaCloud\Client\Request\RoaRequest;
7
use AlibabaCloud\Client\Request\RpcRequest;
8
use AlibabaCloud\Client\Request\UserAgent;
9
10
/**
11
 * Trait RequestTrait
12
 *
13
 * @package   AlibabaCloud\Client\Traits
14
 *
15
 * @mixin     AlibabaCloud
16
 */
17
trait RequestTrait
18
{
19
    /**
20
     * @param string $name
21
     * @param string $value
22
     */
23 1
    public static function userAgentAppend($name, $value)
24
    {
25 1
        UserAgent::append($name, $value);
26 1
    }
27
28
    /**
29
     * @param array $options
30
     *
31
     * @return RpcRequest
32
     */
33 1
    public static function rpcRequest(array $options = [])
34
    {
35 1
        return new RpcRequest($options);
36
    }
37
38
    /**
39
     * @param array $options
40
     *
41
     * @return RoaRequest
42
     */
43 3
    public static function roaRequest(array $options = [])
44
    {
45 3
        return new RoaRequest($options);
46
    }
47
}
48