Code Duplication    Length = 15-16 lines in 2 locations

src/Drivers/Kavenegar.php 1 location

@@ 40-54 (lines=15) @@
37
     *
38
     * @return object
39
     */
40
    public function send()
41
    {
42
        $response = [];
43
        foreach ($this->recipients as $recipient) {
44
            $sms = $this->client->Send(
45
                $this->settings->from,
46
                $recipient,
47
                $this->body
48
            );
49
            $response[$recipient]['data'] = $this->getSmsResponse($sms[0]);
50
            $response[$recipient]['status'] = true;
51
        }
52
53
        return (object) $response;
54
    }
55
56
    /**
57
     * Get the Kavenegar Response.

src/Drivers/Melipayamak.php 1 location

@@ 53-68 (lines=16) @@
50
     *
51
     * @return object
52
     */
53
    public function send()
54
    {
55
        $response = [];
56
        foreach ($this->recipients as $recipient) {
57
            $sms = $this->client->sms()->send(
58
                $recipient,
59
                $this->settings->from,
60
                $this->body,
61
                $this->settings->flash
62
            );
63
            $response[$recipient]['data'] = $this->getSmsResponse($sms);
64
            $response[$recipient]['status'] = true;
65
        }
66
67
        return (object) $response;
68
    }
69
70
    /**
71
     * Get the Melipayamak Response.