| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 19 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 9 | 
| CRAP Score | 3.009 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 32 | 2 | public function send($notifiable, Notification $notification) | |
| 33 |     { | ||
| 34 | 2 |         if (! $token = collect($notifiable->routeNotificationFor('Todoist'))) { | |
| 35 | return; | ||
| 36 | } | ||
| 37 | |||
| 38 | 2 | $command = $notification->toTodoist($notifiable)->toArray(); | |
|  | |||
| 39 | |||
| 40 | 2 | $response = $this->client->post(self::API_ENDPOINT, [ | |
| 41 | 'form_params' => [ | ||
| 42 | 2 | 'commands' => json_encode([$command]), | |
| 43 | 2 | 'token' => $token, | |
| 44 | ], | ||
| 45 | ]); | ||
| 46 | |||
| 47 | 2 |         if ($response->getStatusCode() !== 200) { | |
| 48 | 1 | throw CouldNotSendNotification::serviceRespondedWithAnError($response); | |
| 49 | } | ||
| 50 | 1 | } | |
| 51 | } | ||
| 52 | 
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.