Passed
Pull Request — develop (#1491)
by Rabie
14:52
created

SharedUser::subEntities()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

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
rs 10
1
<?php
2
3
/**
4
 * This file is part of the TelegramBot package.
5
 *
6
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Longman\TelegramBot\Entities;
13
14
/**
15
 * Class SharedUser
16
 *
17
 * This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button.
18
 *
19
 * @link https://core.telegram.org/bots/api#shareduser
20
 *
21
 * @method int         getUserId()    Identifier of the shared user. 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 64-bit integers or double-precision float types are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.
22
 * @method string      getFirstName() Optional. First name of the user, if the name was requested by the bot
23
 * @method string      getLastName()  Optional. Last name of the user, if the name was requested by the bot
24
 * @method string      getUsername()  Optional. Username of the user, if the username was requested by the bot
25
 * @method PhotoSize[] getPhoto()     Optional. Available sizes of the user photo, if the photo was requested by the bot
26
 */
27
class SharedUser extends Entity
28
{
29
    /**
30
     * {@inheritdoc}
31
     */
32
    protected function subEntities(): array
33
    {
34
        return [
35
            'photo' => [PhotoSize::class],
36
        ];
37
    }
38
}
39