Total Complexity | 5 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
8 | class WebhookService |
||
9 | { |
||
10 | protected Webhook $webhook; |
||
11 | |||
12 | public function __construct(Webhook $webhook) |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * Set webhook for telegram bot. |
||
21 | * |
||
22 | * @return string |
||
23 | * @throws WebhookException |
||
24 | */ |
||
25 | public function setWebhook(): string |
||
26 | { |
||
27 | return $this->webhook->setWebhook(); |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Delete webhook for telegram bot. |
||
32 | * |
||
33 | * @return string |
||
34 | * @throws WebhookException |
||
35 | */ |
||
36 | public function deleteWebHook(): string |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Get webhook update. |
||
43 | * |
||
44 | * @return string |
||
45 | * @throws WebhookException |
||
46 | */ |
||
47 | public function getUpdates(): string |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * Get webhook info. |
||
54 | * |
||
55 | * @return string |
||
56 | * |
||
57 | * @throws WebhookException |
||
58 | */ |
||
59 | public function getWebHookInfo(): string |
||
64 |