Code Duplication    Length = 17-18 lines in 2 locations

src/Agents/LuoSiMaoAgent.php 1 location

@@ 29-45 (lines=17) @@
26
        $this->setSignName();
27
    }
28
29
    public function singlesSend($mobile, $send = true)
30
    {
31
        $url = $this->host . $this->singleSendUrl;
32
33
        $postText = $this->content . "【{$this->signName}】";
34
35
        $postData = [
36
            'mobile' => $mobile,
37
            'message' => $postText,
38
        ];
39
40
        if ($send) {
41
            return $this->curl($url, $postData);
42
        }
43
44
        return $postData;
45
    }
46
47
    /**
48
     * @param $url

src/Agents/YunPianAgent.php 1 location

@@ 29-46 (lines=18) @@
26
        $this->setSignName();
27
    }
28
29
    public function singlesSend($mobile, $send = true)
30
    {
31
        $url = $this->host . $this->singleSendUrl;
32
33
        $postText = "【{$this->signName}】" . $this->content;
34
35
        $postData = [
36
            'text' => $postText,
37
            'apikey' => $this->apiKey,
38
            'mobile' => $mobile,
39
        ];
40
41
        if ($send) {
42
            return $this->curl($url, $postData);
43
        }
44
45
        return $postData;
46
    }
47
48
    /**
49
     * @param $url