Passed
Pull Request — develop (#1493)
by Rabie
06:35
created

ChatShared   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A subEntities() 0 4 1
1
<?php
2
3
namespace Longman\TelegramBot\Entities;
4
5
/**
6
 * Class ChatShared
7
 *
8
 * This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.
9
 *
10
 * @link https://core.telegram.org/bots/api#chatshared
11
 *
12
 * @method int         getRequestId() Identifier of the request
13
 * @method int         getChatId()    Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.
14
 * @method string      getTitle()     Optional. Title of the chat, if the title was requested by the bot
15
 * @method string      getUsername()  Optional. Username of the chat, if the username was requested by the bot
16
 * @method PhotoSize[] getPhoto()     Optional. Available sizes of the chat photo, if the photo was requested by the bot
17
 */
18
class ChatShared extends Entity
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23
    protected function subEntities(): array
24
    {
25
        return [
26
            'photo' => [PhotoSize::class],
27
        ];
28
    }
29
}
30