Conditions | 4 |
Paths | 12 |
Total Lines | 29 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
31 | public function send($notifiable, Notification $notification) |
||
32 | { |
||
33 | $message = $notification->toMessagebird($notifiable); |
||
|
|||
34 | |||
35 | $response = []; |
||
36 | |||
37 | if (is_string($message)) { |
||
38 | $message = MessagebirdMessage::create($message); |
||
39 | } |
||
40 | |||
41 | if ($to = $notifiable->routeNotificationFor('messagebird')) { |
||
42 | $message->setRecipients($to); |
||
43 | } |
||
44 | |||
45 | try { |
||
46 | $response = $this->client->send($message); |
||
47 | |||
48 | $this->_dispatcher->dispatch('messagebird-sms', [$notifiable, $notification, $response]); |
||
49 | } catch (CouldNotSendNotification $e) { |
||
50 | new NotificationFailed( |
||
51 | $notifiable, |
||
52 | $notification, |
||
53 | 'messagebird-sms', |
||
54 | $e->getMessage() |
||
55 | ); |
||
56 | } |
||
57 | |||
58 | return $response; |
||
59 | } |
||
60 | } |
||
61 |
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.