Completed
Push — master ( 1b6e10...f9ffe5 )
by Camilo
02:12
created

DeleteWebhook   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 12
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A bindToObject() 0 4 1
A getMandatoryFields() 0 4 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace unreal4u\TelegramAPI\Telegram\Methods;
6
7
use Psr\Log\LoggerInterface;
8
use unreal4u\TelegramAPI\Abstracts\TelegramMethods;
9
use unreal4u\TelegramAPI\Abstracts\TelegramTypes;
10
use unreal4u\TelegramAPI\InternalFunctionality\TelegramRawData;
11
use unreal4u\TelegramAPI\Telegram\Types\Custom\ResultBoolean;
12
use unreal4u\TelegramAPI\Telegram\Types\User;
13
14
/**
15
 * Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.
16
 * Requires no parameters.
17
 *
18
 * Objects defined as-is December 2016
19
 *
20
 * @see GetUpdates
21
 * @see https://core.telegram.org/bots/api#deletewebhook
22
 */
23
class DeleteWebhook extends TelegramMethods
24
{
25
    public static function bindToObject(TelegramRawData $data, LoggerInterface $logger): TelegramTypes
26
    {
27
        return new ResultBoolean($data->getResultBoolean(), $logger);
28
    }
29
30
    public function getMandatoryFields(): array
31
    {
32
        return [];
33
    }
34
}
35