1 | <?php |
||
12 | final class RocketChatWebhookChannel |
||
13 | { |
||
14 | /** @var \NotificationChannels\RocketChat\RocketChat The HTTP client instance. */ |
||
15 | private $rocketChat; |
||
16 | |||
17 | /** |
||
18 | * Create a new RocketChat channel instance. |
||
19 | * |
||
20 | * @param \NotificationChannels\RocketChat\RocketChat $rocketChat |
||
21 | * @return void |
||
|
|||
22 | */ |
||
23 | 4 | public function __construct(RocketChat $rocketChat) |
|
27 | |||
28 | /** |
||
29 | * Send the given notification. |
||
30 | * |
||
31 | * @param mixed $notifiable |
||
32 | * @param \Illuminate\Notifications\Notification $notification |
||
33 | * @return void |
||
34 | * |
||
35 | * @throws \NotificationChannels\RocketChat\Exceptions\CouldNotSendNotification |
||
36 | */ |
||
37 | 4 | public function send($notifiable, Notification $notification): void |
|
61 | |||
62 | /** |
||
63 | * @param string $to |
||
64 | * @param \NotificationChannels\RocketChat\RocketChatMessage $message |
||
65 | * @return void |
||
66 | */ |
||
67 | 3 | private function sendMessage(string $to, RocketChatMessage $message): void |
|
71 | } |
||
72 |
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.