OpenCloud   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 39
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A ddpAddShop() 0 3 1
A ddpDeleteShop() 0 3 1
A ddpGetShopList() 0 3 1
1
<?php
2
3
namespace Abbotton\DouDian\Api;
4
5
use Illuminate\Http\Client\RequestException;
6
use Psr\SimpleCache\InvalidArgumentException;
7
8
class OpenCloud extends BaseRequest
9
{
10
    /**
11
     * 数据推送,推送店铺列表.
12
     *
13
     * @param  array  $params
14
     * @return array
15
     * @throws InvalidArgumentException
16
     * @throws RequestException
17
     */
18
    public function ddpGetShopList(array $params): array
19
    {
20
        return $this->httpPost('openCloud/ddpGetShopList', $params);
21
    }
22
23
    /**
24
     * 数据推送,删除绑定的推送店铺.
25
     *
26
     * @param  array  $params
27
     * @return array
28
     * @throws InvalidArgumentException
29
     * @throws RequestException
30
     */
31
    public function ddpDeleteShop(array $params): array
32
    {
33
        return $this->httpPost('openCloud/ddpDeleteShop', $params);
34
    }
35
36
    /**
37
     * 数据推送,添加数据推送店铺.
38
     *
39
     * @param  array  $params
40
     * @return array
41
     * @throws InvalidArgumentException
42
     * @throws RequestException
43
     */
44
    public function ddpAddShop(array $params): array
45
    {
46
        return $this->httpPost('openCloud/ddpAddShop', $params);
47
    }
48
}
49