Conditions | 5 |
Paths | 10 |
Total Lines | 22 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 0 |
1 | <?php |
||
32 | public function send($notifiable, Notification $notification) |
||
33 | { |
||
34 | $message = $notification->toFacebook($notifiable); |
||
|
|||
35 | |||
36 | if (is_string($message)) { |
||
37 | $message = FacebookMessage::create($message); |
||
38 | } |
||
39 | |||
40 | if ($message->toNotGiven()) { |
||
41 | if (! $to = $notifiable->routeNotificationFor('facebook')) { |
||
42 | throw CouldNotCreateMessage::recipientNotProvided(); |
||
43 | } |
||
44 | |||
45 | $message->to($to); |
||
46 | } |
||
47 | |||
48 | if ($message->senderGiven()) { |
||
49 | $this->fb = Container::getInstance()->make(Facebook::class, ['token' => $message->sender]); |
||
50 | } |
||
51 | |||
52 | $this->fb->send($message->toArray()); |
||
53 | } |
||
54 | } |
||
55 |
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.