| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function send($notifiable, Notification $notification) |
||
| 40 | { |
||
| 41 | $interest = $notifiable->routeNotificationFor('PusherPushNotifications') |
||
| 42 | ?: $this->interestName($notifiable); |
||
| 43 | |||
| 44 | $response = $this->pusher->notify( |
||
| 45 | $interest, |
||
| 46 | $notification->toPushNotification($notifiable)->toArray(), |
||
|
|
|||
| 47 | true |
||
| 48 | ); |
||
| 49 | |||
| 50 | if (! in_array($response['status'], [200, 202])) { |
||
| 51 | $this->events->fire( |
||
| 52 | new NotificationFailed($notifiable, $notification, 'pusher-push-notifications', $response) |
||
| 53 | ); |
||
| 54 | } |
||
| 55 | } |
||
| 56 | |||
| 71 |
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.