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

ChatMemberAdministrator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A subEntities() 0 4 1
1
<?php
2
3
4
namespace Longman\TelegramBot\Entities\ChatMember;
5
6
7
use Longman\TelegramBot\Entities\Entity;
8
use Longman\TelegramBot\Entities\User;
9
10
/**
11
 * Class ChatMemberAdministrator
12
 *
13
 * @link https://core.telegram.org/bots/api#chatmemberadministrator
14
 *
15
 * @method string getStatus()              The member's status in the chat, always “administrator”
16
 * @method User   getUser()                Information about the user
17
 * @method bool   getCanBeEdited()         True, if the bot is allowed to edit administrator privileges of that user
18
 * @method string getCustomTitle()         Custom title for this user
19
 * @method bool   getIsAnonymous()         True, if the user's presence in the chat is hidden
20
 * @method bool   getCanManageChat()       True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
21
 * @method bool   getCanPostMessages()     True, if the administrator can post in the channel; channels only
22
 * @method bool   getCanEditMessages()     True, if the administrator can edit messages of other users and can pin messages; channels only
23
 * @method bool   getCanDeleteMessages()   True, if the administrator can delete messages of other users
24
 * @method bool   getCanManageVoiceChats() True, if the administrator can manage voice chats
25
 * @method bool   getCanRestrictMembers()  True, if the administrator can restrict, ban or unban chat members
26
 * @method bool   getCanPromoteMembers()   True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
27
 * @method bool   getCanChangeInfo()       True, if the user is allowed to change the chat title, photo and other settings
28
 * @method bool   getCanInviteUsers()      True, if the user is allowed to invite new users to the chat
29
 * @method bool   getCanPinMessages()      True, if the user is allowed to pin messages; groups and supergroups only
30
 */
31
class ChatMemberAdministrator extends Entity implements ChatMember
32
{
33
    /**
34
     * @inheritDoc
35
     */
36
    protected function subEntities(): array
37
    {
38
        return [
39
            'user' => User::class,
40
        ];
41
    }
42
43
}
44