Passed
Pull Request — develop (#1229)
by
unknown
02:50
created

BotCommandScopeChat   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
c 1
b 0
f 1
dl 0
loc 6
ccs 0
cts 3
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
4
namespace Longman\TelegramBot\Entities\BotCommandScope;
5
6
7
use Longman\TelegramBot\Entities\Entity;
8
9
/**
10
 * Class BotCommandScopeChat
11
 *
12
 * @link https://core.telegram.org/bots/api#botcommandscopechat
13
 *
14
 * <code>
15
 * $data = [
16
 *   'chat_id' => '123456'
17
 * ];
18
 * </code>
19
 *
20
 * @method string getType()   Scope type, must be chat
21
 * @method string getChatId() Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
22
 *
23
 * @method $this setChatId(string $chat_id) Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
24
 */
25
class BotCommandScopeChat extends Entity implements BotCommandScope
26
{
27
    public function __construct(array $data)
28
    {
29
        $data['type'] = 'chat';
30
        parent::__construct($data);
31
    }
32
}
33