SingleCall   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=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