Test Failed
Pull Request — master (#1462)
by
unknown
05:52
created

Client   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getOrder() 0 3 1
A addOrder() 0 3 1
A getAllExpress() 0 3 1
A cancelOrder() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the overtrue/wechat.
5
 *
6
 * (c) overtrue <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace EasyWeChat\MiniProgram\Logistics;
13
14
use EasyWeChat\Kernel\BaseClient;
15
16
/**
17
 * Class Client.
18
 *
19
 * @author kehuanhuan <[email protected]>
20
 */
21
class Client extends BaseClient
22
{
23
24
    /**
25
     *
26
     * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
27
     */
28
    public function getAllExpress()
29
    {
30
        return $this->httpGet('cgi-bin/express/business/delivery/getall');
31
    }
32
33
    /**
34
     * @param array   $data
35
     *
36
     * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
37
     */
38
    public function addOrder(array $data = [])
39
    {
40
        return $this->httpPostJson('cgi-bin/express/business/order/add', $data);
41
    }
42
43
    /**
44
     * @param array   $data
45
     *
46
     * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
47
     */
48
    public function cancelOrder(array $data = [])
49
    {
50
        return $this->httpPostJson('cgi-bin/express/business/order/cancel', $data);
51
    }
52
53
    /**
54
     * @param array   $data
55
     *
56
     * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
57
     */
58
    public function getOrder(array $data = [])
59
    {
60
        return $this->httpPostJson('cgi-bin/express/business/order/get', $data);
61
    }
62
63
64
}
65