AntiSpam   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A userLogin() 0 3 1
A orderQuery() 0 3 1
A orderSend() 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 AntiSpam extends BaseRequest
9
{
10
    /**
11
     * 商户登陆风险检查.
12
     *
13
     * @param array $params
14
     *
15
     * @throws RequestException
16
     * @throws InvalidArgumentException
17
     *
18
     * @return array
19
     */
20
    public function userLogin(array $params): array
21
    {
22
        return $this->httpPost('antispam/userLogin', $params);
23
    }
24
25
    /**
26
     * 用户在ISV查看订单、下载订单时, 上报事件到风控系统.
27
     *
28
     * @param array $params
29
     *
30
     * @throws RequestException
31
     * @throws InvalidArgumentException
32
     *
33
     * @return array
34
     */
35
    public function orderQuery(array $params): array
36
    {
37
        return $this->httpPost('antispam/orderQuery', $params);
38
    }
39
40
    /**
41
     * 支持使用在ISV系统商户发送(外部系统或模块,如快递平台)场景.
42
     *
43
     * @param array $params
44
     *
45
     * @throws RequestException
46
     * @throws InvalidArgumentException
47
     *
48
     * @return array
49
     */
50
    public function orderSend(array $params): array
51
    {
52
        return $this->httpPost('antispam/orderSend', $params);
53
    }
54
}
55