Total Complexity | 6 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Coverage | 87.5% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class AllMySmsChannel |
||
9 | { |
||
10 | /** @var \NotificationChannels\AllMySms\AllMySms */ |
||
11 | protected $client; |
||
12 | |||
13 | /** |
||
14 | * The sender name the message should sent from. |
||
15 | * |
||
16 | * @var string|null |
||
17 | */ |
||
18 | public $sender; |
||
19 | |||
20 | /** |
||
21 | * The phone number the message should always send to. |
||
22 | * |
||
23 | * @var string|null |
||
24 | */ |
||
25 | protected $to; |
||
26 | |||
27 | /** |
||
28 | * Create a new AllMySmsChannel instance. |
||
29 | * |
||
30 | * @param \NotificationChannels\AllMySms\AllMySms $client |
||
31 | * @param string|null $sender |
||
32 | * @param string|null $to |
||
33 | */ |
||
34 | 2 | public function __construct(AllMySms $client, ?string $sender = null, ?string $to = null) |
|
35 | { |
||
36 | 2 | $this->client = $client; |
|
37 | 2 | $this->sender = $sender; |
|
38 | 2 | $this->to = $to; |
|
39 | 2 | } |
|
40 | |||
41 | /** |
||
42 | * Send the given notification. |
||
43 | * |
||
44 | * @param mixed $notifiable |
||
45 | * @param \Illuminate\Notifications\Notification $notification |
||
46 | * @return void |
||
47 | * |
||
48 | * @throws \NotificationChannels\AllMySms\Exceptions\CouldNotSendNotification |
||
49 | */ |
||
50 | 2 | public function send($notifiable, Notification $notification) |
|
70 | } |
||
71 | } |
||
73 |