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

DeleteWebhook::bindToObject()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
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