Total Complexity | 5 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Changes | 6 | ||
Bugs | 2 | Features | 0 |
1 | <?php |
||
9 | class WebhookService |
||
10 | { |
||
11 | protected WebhookInterface $webhookInterface; |
||
12 | |||
13 | public function __construct(?WebhookInterface $webhookInterface = null) |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * Set webhook for telegram bot. |
||
22 | * |
||
23 | * @return string |
||
24 | * |
||
25 | * @throws WebhookException |
||
26 | */ |
||
27 | public function setWebhook(): string |
||
28 | { |
||
29 | return $this->webhookInterface->setWebhook(); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Delete webhook for telegram bot. |
||
34 | * |
||
35 | * @return string |
||
36 | * |
||
37 | * @throws WebhookException |
||
38 | */ |
||
39 | public function deleteWebHook(): string |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * Get webhook update. |
||
46 | * |
||
47 | * @return string |
||
48 | * |
||
49 | * @throws WebhookException |
||
50 | */ |
||
51 | public function getUpdates(): string |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * Get webhook info. |
||
58 | * |
||
59 | * @return string |
||
60 | * |
||
61 | * @throws WebhookException |
||
62 | */ |
||
63 | public function getWebHookInfo(): string |
||
68 |