Passed
Push — master ( 163ca3...6d62ea )
by Armando
01:57
created

ChatMemberRestricted::subEntities()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Longman\TelegramBot\Entities\ChatMember;
4
5
use Longman\TelegramBot\Entities\Entity;
6
use Longman\TelegramBot\Entities\User;
7
8
/**
9
 * Class ChatMemberRestricted
10
 *
11
 * @link https://core.telegram.org/bots/api#chatmemberrestricted
12
 *
13
 * @method string getStatus()                The member's status in the chat, always “restricted”
14
 * @method User   getUser()                  Information about the user
15
 * @method bool   getIsMember()              True, if the user is a member of the chat at the moment of the request
16
 * @method bool   getCanChangeInfo()         True, if the user is allowed to change the chat title, photo and other settings
17
 * @method bool   getCanInviteUsers()        True, if the user is allowed to invite new users to the chat
18
 * @method bool   getCanPinMessages()        True, if the user is allowed to pin messages; groups and supergroups only
19
 * @method bool   getCanSendMessages()       True, if the user is allowed to send text messages, contacts, locations and venues
20
 * @method bool   getCanSendMediaMessages()  True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes
21
 * @method bool   getCanSendPolls()          True, if the user is allowed to send polls
22
 * @method bool   getCanSendOtherMessages()  True, if the user is allowed to send animations, games, stickers and use inline bots
23
 * @method bool   getCanAddWebPagePreviews() True, if the user is allowed to add web page previews to their messages
24
 * @method int    getUntilDate()             Date when restrictions will be lifted for this user; unix time
25
 */
26
class ChatMemberRestricted extends Entity implements ChatMember
27
{
28
    /**
29
     * @inheritDoc
30
     */
31
    protected function subEntities(): array
32
    {
33
        return [
34
            'user' => User::class
35
        ];
36
    }
37
}
38