Completed
Push — master ( c52910...66a65c )
by lyu
02:53 queued 47s
created

AlipayTradeQueryContentBuilder::setOutTradeNo()   A

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 View Code Duplication
class AlipayTradeQueryContentBuilder 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...
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
}