| Conditions | 3 |
| Paths | 3 |
| Total Lines | 22 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function send($notifiable, Notification $notification) |
||
| 30 | { |
||
| 31 | /** @var SmsUpMessage $message */ |
||
| 32 | $message = $notification->toSmsUp($notifiable); |
||
|
|
|||
| 33 | |||
| 34 | if (empty($message->getTo())) { |
||
| 35 | if (!$to = $notifiable->routeNotificationFor('smsUp')) { |
||
| 36 | throw CouldNotSendNotification::missingRecipient(); |
||
| 37 | } |
||
| 38 | $message->to($to); |
||
| 39 | } |
||
| 40 | |||
| 41 | $messages = [ |
||
| 42 | $message->formatData() |
||
| 43 | ]; |
||
| 44 | $response = Facades\SmsUp::sendMessages($messages); |
||
| 45 | |||
| 46 | $responseArray = []; |
||
| 47 | array_push($responseArray, json_decode($response->getBody(), true)); |
||
| 48 | $reponseMessage = new SmsUpResponse($responseArray[0]); |
||
| 49 | |||
| 50 | Event::dispatch(new SmsUpMessageWasSent($message, $reponseMessage)); |
||
| 51 | } |
||
| 53 |
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.