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