1 | <?php |
||
13 | final class RocketChatWebhookChannel |
||
14 | { |
||
15 | /** |
||
16 | * The HTTP client instance. |
||
17 | * |
||
18 | * @var \NotificationChannels\RocketChat\RocketChat |
||
19 | */ |
||
20 | private $rocketChat; |
||
21 | |||
22 | /** |
||
23 | * Create a new RocketChat channel instance. |
||
24 | * |
||
25 | * @param \NotificationChannels\RocketChat\RocketChat $rocketChat |
||
26 | * @return void |
||
|
|||
27 | */ |
||
28 | public function __construct(RocketChat $rocketChat) |
||
32 | |||
33 | /** |
||
34 | * Send the given notification. |
||
35 | * |
||
36 | * @param mixed $notifiable |
||
37 | * @param \Illuminate\Notifications\Notification $notification |
||
38 | * @return void |
||
39 | * |
||
40 | * @throws \NotificationChannels\RocketChat\Exceptions\CouldNotSendNotification |
||
41 | */ |
||
42 | public function send($notifiable, Notification $notification): void |
||
64 | |||
65 | /** |
||
66 | * @param string $to |
||
67 | * @param \NotificationChannels\RocketChat\RocketChatMessage $message |
||
68 | * @return \Psr\Http\Message\ResponseInterface |
||
69 | */ |
||
70 | private function sendMessage($to, RocketChatMessage $message): ResponseInterface |
||
74 | } |
||
75 |
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.