PassportData::subEntities()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace TelegramBot\Entities\TelegramPassport;
4
5
use TelegramBot\Entity;
6
7
/**
8
 * Class PassportData
9
 *
10
 * Contains information about Telegram Passport data shared with the bot by the user.
11
 *
12
 * @link https://core.telegram.org/bots/api#passportdata
13
 *
14
 * @method EncryptedPassportElement[] getData()         Array with information about documents and other Telegram Passport elements that was shared with the bot
15
 * @method EncryptedCredentials       getCredentials()  Encrypted credentials required to decrypt the data
16
 **/
17
class PassportData extends Entity
18
{
19
20
    /**
21
     * {@inheritdoc}
22
     */
23
    protected function subEntities(): array
24
    {
25
        return [
26
            'data' => [EncryptedPassportElement::class],
27
            'credentials' => EncryptedCredentials::class,
28
        ];
29
    }
30
31
}
32