rezahmady /
smsir
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Rezahmady\Smsir; |
||
| 4 | |||
| 5 | use Rezahmady\Smsir\Exceptions\CouldNotSendNotification; |
||
| 6 | use Illuminate\Notifications\Notification; |
||
| 7 | use Illuminate\Support\Facades\Log; |
||
| 8 | use Rezahmady\Smsir\Facades\Smsir; |
||
| 9 | |||
| 10 | class SmsirChannel |
||
| 11 | { |
||
| 12 | |||
| 13 | public function __construct() |
||
| 14 | { |
||
| 15 | // Initialisation code here |
||
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Send the given notification. |
||
| 20 | * |
||
| 21 | * @param mixed $notifiable |
||
| 22 | * @param \Illuminate\Notifications\Notification $notification |
||
| 23 | * |
||
| 24 | * @throws \Rezahmady\Smsir\Exceptions\CouldNotSendNotification |
||
| 25 | */ |
||
| 26 | public function send($notifiable, Notification $notification) |
||
| 27 | { |
||
| 28 | |||
| 29 | if(! $to = $notifiable->routeNotificationFor('smsir')) { |
||
| 30 | return; |
||
| 31 | } |
||
| 32 | |||
| 33 | $message = $notification->toSmsir($notifiable); |
||
|
0 ignored issues
–
show
|
|||
| 34 | |||
| 35 | return $message->setTo($to)->trigger(); |
||
| 36 | } |
||
| 37 | } |
||
| 38 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.