| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3.0123 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 4 | public function send($notifiable, Notification $notification) |
|
| 34 | { |
||
| 35 | 4 | if ($facebookSettings = $notifiable->routeNotificationFor('facebookPoster')) { |
|
| 36 | $this->switchSettings($facebookSettings); |
||
| 37 | } |
||
| 38 | |||
| 39 | 4 | $post = $notification->toFacebookPoster($notifiable); |
|
|
|
|||
| 40 | |||
| 41 | 4 | $body = $post->getBody(); |
|
| 42 | |||
| 43 | 4 | if ($media = $post->getMedia()) { |
|
| 44 | 2 | $body['source'] = $this->facebook->{$media::API_METHOD}($media->getPath()); |
|
| 45 | } |
||
| 46 | |||
| 47 | 4 | $this->facebook->post($post->getEndpoint(), $body); |
|
| 48 | 4 | } |
|
| 49 | |||
| 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.