BotCommandScopeChatMember::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace TelegramBot\Entities\BotCommandScope;
4
5
use TelegramBot\Entity;
6
7
/**
8
 * Class BotCommandScopeChatMember
9
 *
10
 * @link https://core.telegram.org/bots/api#botcommandscopechatmember
11
 *
12
 * <code>
13
 * $data = [
14
 *   'chat_id' => '123456',
15
 *   'user_id' => 987654,
16
 * ];
17
 * </code>
18
 *
19
 * @method string getType()   Scope type, must be chat_member
20
 * @method string getChatId() Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
21
 * @method int    getUserId() Unique identifier of the target user
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
 * @method $this setUserId(int $user_id)    Unique identifier of the target user
25
 */
26
class BotCommandScopeChatMember extends Entity implements BotCommandScope
27
{
28
29
    public function __construct(array $data = [])
30
    {
31
        $data['type'] = 'chat_member';
32
        parent::__construct($data);
33
    }
34
35
}
36