Code Duplication    Length = 14-14 lines in 2 locations

src/phpsms/agents/YunPianAgent.php 2 locations

@@ 22-35 (lines=14) @@
19
        $this->sendContentSms($to, $content);
20
    }
21
22
    public function sendContentSms($to, $content)
23
    {
24
        $url = 'https://sms.yunpian.com/v1/sms/send.json';
25
        $params = [
26
            'apikey' => $this->apikey,
27
            'mobile' => $to,
28
            'text'   => $content,
29
        ];
30
        $result = $this->curl($url, true, [
31
            CURLOPT_HTTPHEADER => $this->headers,
32
            CURLOPT_POSTFIELDS => http_build_query($params),
33
        ]);
34
        $this->setResult($result);
35
    }
36
37
    public function voiceVerify($to, $code, $tempId, array $data)
38
    {
@@ 37-50 (lines=14) @@
34
        $this->setResult($result);
35
    }
36
37
    public function voiceVerify($to, $code, $tempId, array $data)
38
    {
39
        $url = 'https://voice.yunpian.com/v1/voice/send.json';
40
        $params = [
41
            'apikey' => $this->apikey,
42
            'mobile' => $to,
43
            'code'   => $code,
44
        ];
45
        $result = $this->curl($url, true, [
46
            CURLOPT_HTTPHEADER => $this->headers,
47
            CURLOPT_POSTFIELDS => http_build_query($params),
48
        ]);
49
        $this->setResult($result);
50
    }
51
52
    protected function setResult($result)
53
    {