Code Duplication    Length = 44-44 lines in 3 locations

src/F2fpay/Base/Model/Builder/AlipayTradeCancelContentBuilder.php 1 location

@@ 6-49 (lines=44) @@
3
namespace Kaylyu\Alipay\F2fpay\Base\Model\Builder;
4
5
6
class AlipayTradeCancelContentBuilder extends ContentBuilder
7
{
8
    // 支付宝交易号,和商户订单号不能同时为空
9
    private $tradeNo;
10
11
    // 商户订单号,通过商户订单号撤销相关交易
12
    private $outTradeNo;
13
14
    private $bizContentarr = array();
15
16
    private $bizContent = null;
17
18
    public function getBizContent()
19
    {
20
        if (!empty($this->bizContentarr)) {
21
            $this->bizContent = json_encode($this->bizContentarr, JSON_UNESCAPED_UNICODE);
22
        }
23
        return $this->bizContent;
24
    }
25
26
    public function getOutTradeNo()
27
    {
28
        return $this->outTradeNo;
29
    }
30
31
    public function setOutTradeNo($outTradeNo)
32
    {
33
        $this->outTradeNo = $outTradeNo;
34
        $this->bizContentarr['out_trade_no'] = $outTradeNo;
35
    }
36
37
    public function getTradeNo()
38
    {
39
        return $this->tradeNo;
40
    }
41
42
    public function setTradeNo($tradeNo)
43
    {
44
        $this->tradeNo = $tradeNo;
45
        $this->bizContentarr['trade_no'] = $tradeNo;
46
    }
47
48
49
}

src/F2fpay/Base/Model/Builder/AlipayTradeCloseContentBuilder.php 1 location

@@ 6-49 (lines=44) @@
3
namespace Kaylyu\Alipay\F2fpay\Base\Model\Builder;
4
5
6
class AlipayTradeCloseContentBuilder extends ContentBuilder
7
{
8
    // 支付宝交易号,和商户订单号不能同时为空
9
    private $tradeNo;
10
11
    // 商户订单号,通过商户订单号撤销相关交易
12
    private $outTradeNo;
13
14
    private $bizContentarr = array();
15
16
    private $bizContent = null;
17
18
    public function getBizContent()
19
    {
20
        if (!empty($this->bizContentarr)) {
21
            $this->bizContent = json_encode($this->bizContentarr, JSON_UNESCAPED_UNICODE);
22
        }
23
        return $this->bizContent;
24
    }
25
26
    public function getOutTradeNo()
27
    {
28
        return $this->outTradeNo;
29
    }
30
31
    public function setOutTradeNo($outTradeNo)
32
    {
33
        $this->outTradeNo = $outTradeNo;
34
        $this->bizContentarr['out_trade_no'] = $outTradeNo;
35
    }
36
37
    public function getTradeNo()
38
    {
39
        return $this->tradeNo;
40
    }
41
42
    public function setTradeNo($tradeNo)
43
    {
44
        $this->tradeNo = $tradeNo;
45
        $this->bizContentarr['trade_no'] = $tradeNo;
46
    }
47
48
49
}

src/F2fpay/Base/Model/Builder/AlipayTradeQueryContentBuilder.php 1 location

@@ 5-48 (lines=44) @@
2
3
namespace Kaylyu\Alipay\F2fpay\Base\Model\Builder;
4
5
class AlipayTradeQueryContentBuilder extends ContentBuilder
6
{
7
    // 支付宝交易号,和商户订单号不能同时为空, 如果同时存在则通过tradeNo查询支付宝交易
8
    private $tradeNo;
9
10
    // 商户订单号,通过此商户订单号查询当面付的交易状态
11
    private $outTradeNo;
12
13
    private $bizContentarr = array();
14
15
    private $bizContent = null;
16
17
    public function getBizContent()
18
    {
19
        if (!empty($this->bizContentarr)) {
20
            $this->bizContent = json_encode($this->bizContentarr, JSON_UNESCAPED_UNICODE);
21
        }
22
        return $this->bizContent;
23
    }
24
25
    public function getOutTradeNo()
26
    {
27
        return $this->outTradeNo;
28
    }
29
30
    public function setOutTradeNo($outTradeNo)
31
    {
32
        $this->outTradeNo = $outTradeNo;
33
        $this->bizContentarr['out_trade_no'] = $outTradeNo;
34
    }
35
36
    public function getTradeNo()
37
    {
38
        return $this->tradeNo;
39
    }
40
41
    public function setTradeNo($tradeNo)
42
    {
43
        $this->tradeNo = $tradeNo;
44
        $this->bizContentarr['trade_no'] = $tradeNo;
45
    }
46
47
48
}