Completed
Push — master ( 9c1b3c...83fed1 )
by Songda
03:57 queued 16s
created

RefundGateway::getTradeType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Yansongda\Pay\Gateways\Wechat;
4
5
use Yansongda\Pay\Exceptions\InvalidArgumentException;
6
7
class RefundGateway extends Gateway
8
{
9
    /**
10
     * Find.
11
     *
12
     * @author yansongda <[email protected]>
13
     *
14
     * @param $order
15
     *
16
     * @return array
17
     */
18 View Code Duplication
    public function find($order): array
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
19
    {
20
        return [
21
            'endpoint' => 'pay/refundquery',
22
            'order'    => is_array($order) ? $order : ['out_trade_no' => $order],
23
            'cert'     => false,
24
        ];
25
    }
26
27
    /**
28
     * Pay an order.
29
     *
30
     * @author yansongda <[email protected]>
31
     *
32
     * @param string $endpoint
33
     * @param array  $payload
34
     *
35
     * @throws InvalidArgumentException
36
     *
37
     * @return void
38
     */
39
    public function pay ($endpoint, array $payload)
40
    {
41
        throw new InvalidArgumentException('Not Support Refund In Pay');
42
    }
43
44
    /**
45
     * Get trade type config.
46
     *
47
     * @author yansongda <[email protected]>
48
     *
49
     * @throws InvalidArgumentException
50
     *
51
     * @return void
52
     */
53
    protected function getTradeType ()
54
    {
55
        throw new InvalidArgumentException('Not Support Refund In Pay');
56
    }
57
}
58