Completed
Push — master ( b912bc...bac835 )
by Kazi Mainuddin
01:57
created

SmsBuilder::send()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Tzsk\Sms;
4
5
class SmsBuilder
6
{
7
    /**
8
     * @var array
9
     */
10
    protected $recipients = [];
11
12
    /**
13
     * @var string
14
     */
15
    protected $body;
16
17
    /**
18
     * @var string
19
     */
20
    protected $driver;
21
22
    /**
23
     * Get the value of recipients
24
     */
25
    public function getRecipients()
26
    {
27
        return $this->recipients;
28
    }
29
30
    /**
31
     * Set the value of recipients
32
     *
33
     * @return  self
34
     */
35
    public function to($recipients)
36
    {
37
        $this->recipients = is_array($recipients) ? $recipients : [$recipients];
38
39
        return $this;
40
    }
41
42
    /**
43
     * Get the value of body
44
     */
45
    public function getBody()
46
    {
47
        return $this->body;
48
    }
49
50
    /**
51
     * Set the value of body
52
     *
53
     * @return  self
54
     */
55
    public function send($body)
56
    {
57
        $this->body = $body;
58
59
        return $this;
60
    }
61
62
    /**
63
     * Get the value of driver
64
     */
65
    public function getDriver()
66
    {
67
        return $this->driver;
68
    }
69
70
    /**
71
     * Set the value of driver
72
     *
73
     * @return  self
74
     */
75
    public function via($driver)
76
    {
77
        $this->driver = $driver;
78
79
        return $this;
80
    }
81
}
82