Passed
Push — master ( 163ca3...6d62ea )
by Armando
01:57
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
namespace Longman\TelegramBot\Entities\BotCommandScope;
4
5
use Longman\TelegramBot\Entities\Entity;
6
7
/**
8
 * Class BotCommandScopeChat
9
 *
10
 * @link https://core.telegram.org/bots/api#botcommandscopechat
11
 *
12
 * <code>
13
 * $data = [
14
 *   'chat_id' => '123456'
15
 * ];
16
 * </code>
17
 *
18
 * @method string getType()   Scope type, must be chat
19
 * @method string getChatId() Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
20
 *
21
 * @method $this setChatId(string $chat_id) Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
22
 */
23
class BotCommandScopeChat extends Entity implements BotCommandScope
24
{
25
    public function __construct(array $data = [])
26
    {
27
        $data['type'] = 'chat';
28
        parent::__construct($data);
29
    }
30
}
31