| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 5 | public static function make($notifiable, Notification $notification, $targeting) : array |
|
| 19 | { |
||
| 20 | 5 | $payload = $notification->toOneSignal($notifiable)->toArray(); |
|
|
|
|||
| 21 | |||
| 22 | 5 | if (static::isTargetingEmail($targeting)) { |
|
| 23 | 1 | $payload['filters'] = collect([['field' => 'email', 'value' => $targeting['email']]]); |
|
| 24 | 4 | } elseif (static::isTargetingTags($targeting)) { |
|
| 25 | 1 | $payload['tags'] = collect([$targeting['tags']]); |
|
| 26 | } else { |
||
| 27 | 3 | $payload['include_player_ids'] = collect($targeting); |
|
| 28 | } |
||
| 29 | |||
| 30 | 5 | return $payload; |
|
| 31 | } |
||
| 32 | |||
| 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.