| Conditions | 4 |
| Paths | 6 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function send($notifiable, Notification $notification) |
||
| 32 | { |
||
| 33 | $lineMessage = $notification->toLine($notifiable); |
||
|
|
|||
| 34 | |||
| 35 | $to = $notifiable->routeNotificationFor('line') ?: config('services.line.user_id'); |
||
| 36 | |||
| 37 | try { |
||
| 38 | $response = $this->line->pushMessage($to, $lineMessage); |
||
| 39 | } catch (CurlExecutionException $e) { |
||
| 40 | throw CouldNotSendNotification::curlError($e); |
||
| 41 | } |
||
| 42 | |||
| 43 | if (! $response->isSucceeded()) { |
||
| 44 | throw CouldNotSendNotification::serviceRespondedWithAnError($response); |
||
| 45 | } |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
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.