Passed
Push — master ( 9e5a11...b08ede )
by frey
01:13 queued 11s
created

Client   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
c 1
b 0
f 0
dl 0
loc 24
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 8 1
A getBaseUri() 0 3 1
1
<?php
2
3
namespace Freyo\ApiGateway\Service;
4
5
use Freyo\ApiGateway\Kernel\TencentCloudClient;
6
7
class Client extends TencentCloudClient
8
{
9
    /**
10
     * @return string
11
     */
12
    protected function getBaseUri()
13
    {
14
        return 'https://apigateway.api.qcloud.com/v2/';
15
    }
16
17
    /**
18
     * @param $serviceId
19
     *
20
     * @return array|\Freyo\ApiGateway\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
21
     * @throws \Freyo\ApiGateway\Kernel\Exceptions\InvalidConfigException
22
     */
23
    public function get($serviceId)
24
    {
25
        $params = [
26
            'Action' => 'DescribeService',
27
            'serviceId' => $serviceId,
28
        ];
29
30
        return $this->httpPost('index.php', $params);
31
    }
32
}