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
Pull Request — master (#162)
by Yong
04:44
created

Path   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 17
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A assign() 0 7 2
1
<?php
2
3
namespace AlibabaCloud\Client\Support;
4
5
/**
6
 * Class Path
7
 *
8
 * @package AlibabaCloud\Client\Support
9
 */
10
class Path
11
{
12
    /**
13
     * Assign path parameters to the url.
14
     *
15
     * @param string $pattern
16
     * @param array  $parameters
17
     *
18
     * @return string
19
     */
20 20
    public static function assign($pattern, array $parameters)
21
    {
22 20
        foreach ($parameters as $key => $value) {
23 12
            $pattern = str_replace("[$key]", $value, $pattern);
24 20
        }
25
26 20
        return $pattern;
27
    }
28
}
29