AlipayTradeCancelContentBuilder::setOutTradeNo()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 5
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 5
loc 5
ccs 0
cts 5
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Kaylyu\Alipay\F2fpay\Base\Model\Builder;
4
5
6 View Code Duplication
class AlipayTradeCancelContentBuilder extends ContentBuilder
0 ignored issues
show
Duplication introduced by
This class 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...
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
}