1 | <?php |
||
9 | class WebPushChannel |
||
10 | { |
||
11 | /** |
||
12 | * @var \Minishlink\WebPush\WebPush |
||
13 | */ |
||
14 | protected $webPush; |
||
15 | |||
16 | /** |
||
17 | * @var \NotificationChannels\WebPush\ReportHandlerInterface |
||
18 | */ |
||
19 | protected $reportHandler; |
||
20 | |||
21 | /** |
||
22 | * @param \Minishlink\WebPush\WebPush $webPush |
||
23 | * @param \NotificationChannels\WebPush\ReportHandlerInterface $webPush |
||
24 | * @return void |
||
|
|||
25 | */ |
||
26 | 2 | public function __construct(WebPush $webPush, ReportHandlerInterface $reportHandler) |
|
31 | |||
32 | /** |
||
33 | * Send the given notification. |
||
34 | * |
||
35 | * @param mixed $notifiable |
||
36 | * @param \Illuminate\Notifications\Notification $notification |
||
37 | * @return void |
||
38 | */ |
||
39 | 2 | public function send($notifiable, Notification $notification) |
|
67 | |||
68 | /** |
||
69 | * Handle the reports. |
||
70 | * |
||
71 | * @param \Generator $reports |
||
72 | * @param \Illuminate\Database\Eloquent\Collection $subscriptions |
||
73 | * @param \NotificationChannels\WebPush\WebPushMessage $message |
||
74 | * @return void |
||
75 | */ |
||
76 | 2 | protected function handleReports($reports, $subscriptions, $message) |
|
85 | |||
86 | /** |
||
87 | * @param \Illuminate\Database\Eloquent\Collection $subscriptions |
||
88 | * @param \Minishlink\WebPush\MessageSentReport $report |
||
89 | * @return void |
||
90 | */ |
||
91 | 2 | protected function findSubscription($subscriptions, $report) |
|
99 | } |
||
100 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.