DeleteWebhookMethod   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 7
dl 0
loc 23
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 9 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace TgBotApi\BotApiBase\Method;
6
7
use TgBotApi\BotApiBase\Method\Interfaces\DeleteMethodAliasInterface;
8
use TgBotApi\BotApiBase\Method\Traits\FillFromArrayTrait;
9
10
/**
11
 * Class DeleteWebhookMethod.
12
 *
13
 * @see https://core.telegram.org/bots/api#deletewebhook
14
 */
15
class DeleteWebhookMethod implements DeleteMethodAliasInterface
16
{
17
    use FillFromArrayTrait;
18
19
    /**
20
     * Pass True to drop all pending updates.
21
     *
22
     * @var bool|null
23
     */
24
    public $dropPendingUpdates;
25
26
    /**
27
     * @throws \TgBotApi\BotApiBase\Exception\BadArgumentException
28
     */
29 1
    public static function create(array $data = null): DeleteWebhookMethod
30
    {
31 1
        $instance = new static();
32
33 1
        if ($data) {
34 1
            $instance->fill($data);
35
        }
36
37 1
        return $instance;
38
    }
39
}
40