SingleCall::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 4
1
<?php
2
3
namespace Vicens\Alidayu\Request;
4
5
/**
6
 * 语音通知
7
 * @link https://api.alidayu.com/docs/api.htm?apiId=25445
8
 * @method $this|string calledNum(string | null $calledNum = null)
9
 * @method $this|string calledShowNum(string | null $calledShowNum = null)
10
 * @method $this|string voiceCode(string | null $voiceCode = null)
11
 * @method $this|string extend(string | null $extend = null)
12
 */
13
class SingleCall extends AbstractRequest
14
{
15
16
    /**
17
     * SingleCall constructor.
18
     * @param string $calledNum 被叫号码
19
     * @param string $calledShowNum 被叫号码侧的号码显示
20
     * @param string $voiceCode 语音文件ID
21
     * @param string $extend 回传参数
22
     */
23
    public function __construct($calledNum, $calledShowNum, $voiceCode, $extend = '')
24
    {
25
        $this->setParams([
26
            'called_num' => $calledNum,
27
            'called_show_num' => $calledShowNum,
28
            'voice_code' => $voiceCode,
29
            'extend' => $extend
30
        ]);
31
    }
32
33
    /**
34
     * 返回接口名
35
     * @return string
36
     */
37
    public function getMethod()
38
    {
39
        return 'alibaba.aliqin.fc.voice.num.singlecall';
40
    }
41
}
42