Completed
Push — master ( 8985cd...182148 )
by Camilo
06:32
created

LogOut::getMandatoryFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
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\TelegramResponse;
11
use unreal4u\TelegramAPI\Telegram\Types\Custom\ResultBoolean;
12
13
/**
14
 * Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot
15
 * before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful
16
 * call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server
17
 * for 10 minutes. Returns True on success. Requires no parameters.
18
 *
19
 * Objects defined as-is november 2020
20
 *
21
 * @see https://core.telegram.org/bots/api#logout
22
 */
23
class LogOut extends TelegramMethods
24
{
25
    public static function bindToObject(TelegramResponse $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