| 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 | * @codeCoverageIgnore |
||
| 13 | * @mixin Rpc |
||
| 14 | * @mixin Roa |
||
| 15 | * @mixin Request |
||
| 16 | * @package AlibabaCloud\Client\Resolver |
||
| 17 | */ |
||
| 18 | trait ActionResolverTrait |
||
| 19 | { |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Resolve Action name from class name |
||
| 23 | */ |
||
| 24 | private function resolveActionName() |
||
| 25 | { |
||
| 26 | if (!$this->action) { |
||
| 27 | $array = explode('\\', get_class($this)); |
||
| 28 | $this->action = array_pop($array); |
||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Append SDK version into User-Agent |
||
| 34 | * |
||
| 35 | * @throws ClientException |
||
| 36 | * @throws ReflectionException |
||
| 37 | */ |
||
| 38 | private function appendSdkUA() |
||
| 39 | { |
||
| 40 | if (!(new ReflectionClass(AlibabaCloud::class))->hasMethod('appendUserAgent')) { |
||
| 41 | return; |
||
| 42 | } |
||
| 43 | |||
| 44 | if (!class_exists('AlibabaCloud\Release')) { |
||
| 45 | return; |
||
| 46 | } |
||
| 47 | |||
| 48 | AlibabaCloud::appendUserAgent('SDK', \AlibabaCloud\Release::VERSION); |
||
|
0 ignored issues
–
show
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 49 | } |
||
| 50 | } |
||
| 51 |