Skip to content

Commit 24b9072

Browse files
committed
Add docblock
1 parent d5dd5a0 commit 24b9072

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/WebPushChannel.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,18 @@ public function send($notifiable, Notification $notification)
6161
}
6262

6363
/**
64-
* @param $response
65-
* @param $subscriptions
64+
* @param array|bool $response
65+
* @param \Illuminate\Database\Eloquent\Collection $subscriptions
6666
*/
6767
protected function deleteInvalidSubscriptions($response, $subscriptions)
6868
{
69-
if (is_array($response)) {
70-
foreach ($response as $index => $value) {
71-
if (! $value['success'] && isset($subscriptions[$index])) {
72-
$subscriptions[$index]->delete();
73-
}
69+
if (! is_array($response)) {
70+
return;
71+
}
72+
73+
foreach ($response as $index => $value) {
74+
if (! $value['success'] && isset($subscriptions[$index])) {
75+
$subscriptions[$index]->delete();
7476
}
7577
}
7678
}

0 commit comments

Comments
 (0)