ChatJoinRequest::subEntities()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
namespace TelegramBot\Entities;
4
5
use TelegramBot\Entity;
6
7
/**
8
 * Class ChatJoinRequest
9
 *
10
 * Represents a join request sent to a chat.
11
 *
12
 * @link https://core.telegram.org/bots/api#chatjoinrequest
13
 *
14
 * @method Chat           getChat()        Chat to which the request was sent
15
 * @method User           getFrom()        User that sent the join request
16
 * @method int            getDate()        Date the request was sent in Unix time
17
 * @method string         getBio()            Optional. Bio of the user.
18
 * @method ChatInviteLink getInviteLink()    Optional. Chat invite link that was used by the user to send the join request
19
 */
20
class ChatJoinRequest extends Entity
21
{
22
23
    /**
24
     * {@inheritdoc}
25
     */
26
    protected function subEntities(): array
27
    {
28
        return [
29
            'chat' => Chat::class,
30
            'from' => User::class,
31
            'invite_link' => ChatInviteLink::class,
32
        ];
33
    }
34
35
}
36