Code Duplication    Length = 12-15 lines in 2 locations

src/Concrete/AfricasTalking.php 1 location

@@ 16-27 (lines=12) @@
13
     * Class Constructor.
14
     * @param null $message
15
     */
16
    public function __construct($message = null)
17
    {
18
        if ($message) {
19
            $this->text($message);
20
        }
21
        $this->client = $this->getInstance();
22
        $headers = [
23
          'apiKey' => config('laravel-sms.africas_talking.api_key'),
24
            'Content-Type' => 'application/x-www-form-urlencoded',
25
        ];
26
        $this->request = new Request('POST', $this->baseUrl.'version1/messaging', $headers);
27
    }
28
29
    /**
30
     * @param null $text

src/Concrete/SmartSmsSolutions.php 1 location

@@ 23-37 (lines=15) @@
20
     *
21
     * @param null $message
22
     */
23
    public function __construct($message = null)
24
    {
25
        $this->username = config('laravel-sms.smart_sms.token');
26
        if ($message) {
27
            $this->text($message);
28
        }
29
30
        $headers = [
31
            'Content-Type' => 'Content-type: application/x-www-form-urlencoded',
32
            'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36 OPR/47.0.2631.39',
33
        ];
34
35
        $this->client = $this->getInstance();
36
        $this->request = new Request('GET', $this->baseUrl.'json.php', $headers);
37
    }
38
39
    /**
40
     * @param null $text