| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3.009 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | 2 | public function send($notifiable, Notification $notification) |
|
| 36 | { |
||
| 37 | 2 | $message = $notification->toFlock($notifiable); |
|
|
|
|||
| 38 | |||
| 39 | 2 | if (is_string($message)) { |
|
| 40 | $message = FlockMessage::create($message); |
||
| 41 | } |
||
| 42 | |||
| 43 | 2 | if (! $notifiable->routeNotificationFor('flock')) { |
|
| 44 | 1 | throw CouldNotSendNotification::flockRouteNotProvided(); |
|
| 45 | } |
||
| 46 | |||
| 47 | 1 | $url = $notifiable->routeNotificationFor('flock'); |
|
| 48 | 1 | $params = $message->toArray(); |
|
| 49 | |||
| 50 | 1 | $this->flock->sendMessage($url, $params); |
|
| 51 | 1 | } |
|
| 52 | } |
||
| 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.