PassportData::subEntities()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
ccs 0
cts 2
cp 0
crap 2
rs 10
c 2
b 0
f 0
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\TelegramPassport;
13
14
use Longman\TelegramBot\Entities\Entity;
15
16
/**
17
 * Class PassportData
18
 *
19
 * Contains information about Telegram Passport data shared with the bot by the user.
20
 *
21
 * @link https://core.telegram.org/bots/api#passportdata
22
 *
23
 * @method EncryptedPassportElement[] getData()        Array with information about documents and other Telegram Passport elements that was shared with the bot
24
 * @method EncryptedCredentials       getCredentials() Encrypted credentials required to decrypt the data
25
 **/
26
class PassportData extends Entity
27
{
28
    /**
29
     * {@inheritdoc}
30
     */
31
    protected function subEntities(): array
32
    {
33
        return [
34
            'data'        => [EncryptedPassportElement::class],
35
            'credentials' => EncryptedCredentials::class,
36
        ];
37
    }
38
}
39