| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 15 | public function send($notifiable, HablameNotification $notification) |
||
| 16 | { |
||
| 17 | $message = $notification->toHablameNotification($notifiable); |
||
| 18 | 4 | ||
| 19 | /** @var \Andreshg112\HablameSms\HablameMessage $message */ |
||
| 20 | $messageArray = $message->toArray(); |
||
| 21 | |||
| 22 | try { |
||
| 23 | 4 | Facade::sendMessage( |
|
| 24 | $messageArray['phoneNumbers'], |
||
| 25 | 4 | $messageArray['sms'], |
|
| 26 | $messageArray['sendDate'] |
||
| 27 | 4 | ); |
|
| 28 | 4 | } catch (\Throwable $th) { |
|
| 29 | 4 | throw new CouldNotSendNotification($th->getMessage(), $th->getCode(), $th); |
|
| 30 | 4 | } |
|
| 33 |