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.

Signature::rpc()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 5
rs 10
1
<?php
2
3
namespace AlibabaCloud\Client\Signature;
4
5
use GuzzleHttp\Psr7\Request;
6
use AlibabaCloud\Client\Support\Sign;
7
8
/**
9
 * Class Signature
10
 *
11
 * @package AlibabaCloud\Client\Signature
12
 */
13
abstract class Signature
14
{
15
16
    /**
17
     * @codeCoverageIgnore
18
     *
19
     * @param string  $accessKeyId
20
     * @param string  $accessKeySecret
21
     * @param Request $request
22
     *
23
     * @return string
24
     */
25
    public function roa($accessKeyId, $accessKeySecret, Request $request)
26
    {
27
        $string = Sign::roaString($request);
28
29
        $signature = $this->sign($string, $accessKeySecret);
0 ignored issues
show
Bug introduced by
The method sign() does not exist on AlibabaCloud\Client\Signature\Signature. Since it exists in all sub-types, consider adding an abstract or default implementation to AlibabaCloud\Client\Signature\Signature. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

29
        /** @scrutinizer ignore-call */ 
30
        $signature = $this->sign($string, $accessKeySecret);
Loading history...
30
31
        return "acs $accessKeyId:$signature";
32
    }
33
34
    /**
35
     * @codeCoverageIgnore
36
     *
37
     * @param string $accessKeySecret
38
     * @param string $method
39
     * @param array  $parameters
40
     *
41
     * @return string
42
     */
43
    public function rpc($accessKeySecret, $method, array $parameters)
44
    {
45
        $string = Sign::rpcString($method, $parameters);
46
47
        return $this->sign($string, $accessKeySecret . '&');
48
    }
49
}
50