| Total Complexity | 4 |
| Total Lines | 71 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class SmspohMessage |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The message content. |
||
| 9 | * |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | public $content; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * The sander name the message should be sent from. |
||
| 16 | * |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | public $sender; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Set the test message Send a test message to specific mobile number. |
||
| 23 | * |
||
| 24 | * @var bool |
||
| 25 | */ |
||
| 26 | public $test = false; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Create a new message instance. |
||
| 30 | * |
||
| 31 | * @param string $content |
||
| 32 | * @return void |
||
| 33 | */ |
||
| 34 | 8 | public function __construct($content = '') |
|
| 35 | { |
||
| 36 | 8 | $this->content = $content; |
|
| 37 | 8 | } |
|
| 38 | |||
| 39 | /** |
||
| 40 | * Set the message content. |
||
| 41 | * |
||
| 42 | * @param string $content |
||
| 43 | * @return $this |
||
| 44 | */ |
||
| 45 | 1 | public function content($content) |
|
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Set the sender name the message should be sent from. |
||
| 54 | * |
||
| 55 | * @param string $sender |
||
| 56 | * @return $this |
||
| 57 | */ |
||
| 58 | 4 | public function sender($sender) |
|
| 59 | { |
||
| 60 | 4 | $this->sender = $sender; |
|
| 61 | |||
| 62 | 4 | return $this; |
|
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Set the test message Send a test message to specific mobile number. |
||
| 67 | * |
||
| 68 | * @param bool $test |
||
| 69 | * @return $this |
||
| 70 | */ |
||
| 71 | 1 | public function test($test = true) |
|
| 76 | } |
||
| 77 | } |
||
| 78 |