Conditions | 4 |
Paths | 6 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
38 | public function send($notifiable, Notification $notification): void |
||
39 | { |
||
40 | $message = $notification->toFacebook($notifiable); |
||
|
|||
41 | |||
42 | if (is_string($message)) { |
||
43 | $message = FacebookMessage::create($message); |
||
44 | } |
||
45 | |||
46 | if ($message->toNotGiven()) { |
||
47 | if (! $to = $notifiable->routeNotificationFor('facebook')) { |
||
48 | throw CouldNotCreateMessage::recipientNotProvided(); |
||
49 | } |
||
50 | |||
51 | $message->to($to); |
||
52 | } |
||
53 | |||
54 | $this->fb->send($message->toArray()); |
||
55 | } |
||
56 | } |
||
57 |
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.