| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3.0123 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | 1 | public function send($notifiable, Notification $notification) |
|
| 49 | { |
||
| 50 | 1 | $tokens = (array) $notifiable->routeNotificationFor('apn', $notification); |
|
| 51 | |||
| 52 | 1 | if (empty($tokens)) { |
|
| 53 | return; |
||
| 54 | } |
||
| 55 | |||
| 56 | 1 | $message = $notification->toApn($notifiable); |
|
|
|
|||
| 57 | |||
| 58 | 1 | $client = $message->client ?? $this->client; |
|
| 59 | |||
| 60 | 1 | foreach ($tokens as $token) { |
|
| 61 | 1 | $client->addNotification((new ApnAdapter)->adapt($message, $token)); |
|
| 62 | } |
||
| 63 | |||
| 64 | 1 | return $client->push(); |
|
| 65 | } |
||
| 66 | } |
||
| 67 |
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.