FlowChargeProvince   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 27
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getMethod() 0 3 1
1
<?php
2
3
namespace Vicens\Alidayu\Request;
4
5
/**
6
 * 流量直充分省
7
 * @link https://api.alidayu.com/docs/api.htm?apiId=26477
8
 * @method $this|string phoneNum(string | null $phoneNum = null)
9
 * @method $this|string grade(string | null $grade = null)
10
 * @method $this|string outRechargeId(string | null $outRechargeId = null)
11
 * @method $this|string reason(string | null $reason = null)
12
 */
13
class FlowChargeProvince extends AbstractRequest
14
{
15
16
    /**
17
     * FlowCharge constructor.
18
     * @param string $phoneNum 手机号
19
     * @param int $grade 充值数量
20
     * @param string $outRechargeId 唯一流水号
21
     * @param string $reason 充值原因
22
     */
23
    public function __construct($phoneNum, $grade, $outRechargeId, $reason = '')
24
    {
25
        $this->setParams([
26
            'phone_num' => $phoneNum,
27
            'grade' => $grade,
28
            'out_recharge_id' => $outRechargeId,
29
            'reason' => $reason
30
        ]);
31
    }
32
33
    /**
34
     * 返回接口名
35
     * @return string
36
     */
37
    public function getMethod()
38
    {
39
        return 'alibaba.aliqin.fc.flow.charge.province';
40
    }
41
}
42