| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 2 | public function send($notifiable, Notification $notification) |
|
| 41 | { |
||
| 42 | 2 | $interest = $notifiable->routeNotificationFor('PusherPushNotifications') |
|
| 43 | 2 | ?: $this->interestName($notifiable); |
|
| 44 | |||
| 45 | try { |
||
| 46 | 2 | $this->beamsClient->publishToInterests( |
|
| 47 | 2 | is_array($interest) ? $interest : [$interest], |
|
| 48 | 2 | $notification->toPushNotification($notifiable)->toArray() |
|
| 49 | ); |
||
| 50 | 1 | } catch (Throwable $exception) { |
|
| 51 | 1 | $this->events->dispatch( |
|
| 52 | 1 | new NotificationFailed($notifiable, $notification, 'pusher-push-notifications') |
|
| 53 | ); |
||
| 54 | } |
||
| 55 | 2 | } |
|
| 56 | |||
| 71 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.