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 ( 11d0b4...d37a6c )
by Yong
04:15
created

ActionResolverTrait::resolveActionName()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace AlibabaCloud\Client\Resolver;
4
5
use ReflectionClass;
6
use ReflectionException;
7
use AlibabaCloud\Client\AlibabaCloud;
8
use AlibabaCloud\Client\Request\Request;
9
use AlibabaCloud\Client\Exception\ClientException;
10
11
/**
12
 * @internal
13
 * @codeCoverageIgnore
14
 * @mixin Rpc
15
 * @mixin Roa
16
 * @mixin Request
17
 * @package AlibabaCloud\Client\Resolver
18
 */
19
trait ActionResolverTrait
20
{
21
22
    /**
23
     * Resolve Action name from class name
24
     */
25
    private function resolveActionName()
26
    {
27
        if (!$this->action) {
28
            $array        = explode('\\', get_class($this));
29
            $this->action = array_pop($array);
0 ignored issues
show
Bug Best Practice introduced by
The property action does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
30
        }
31
    }
32
33
    /**
34
     * Append SDK version into User-Agent
35
     *
36
     * @throws ClientException
37
     * @throws ReflectionException
38
     */
39
    private function appendSdkUA()
40
    {
41
        if (!(new ReflectionClass(AlibabaCloud::class))->hasMethod('appendUserAgent')) {
42
            return;
43
        }
44
45
        if (!class_exists('AlibabaCloud\Release')) {
46
            return;
47
        }
48
49
        AlibabaCloud::appendUserAgent('SDK', \AlibabaCloud\Release::VERSION);
0 ignored issues
show
Bug introduced by
The type AlibabaCloud\Release was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
50
    }
51
}
52