Passed
Push — psr3-logger ( a933b6...377173 )
by Armando
02:49 queued 11s
created

EncryptedPassportElement::getTranslation()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
crap 6
1
<?php
2
/**
3
 * This file is part of the TelegramBot package.
4
 *
5
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Longman\TelegramBot\Entities\TelegramPassport;
12
13
use Longman\TelegramBot\Entities\Entity;
14
15
/**
16
 * Class EncryptedPassportElement
17
 *
18
 * Contains information about documents or other Telegram Passport elements shared with the bot by the user.
19
 *
20
 * @link https://core.telegram.org/bots/api#encryptedpassportelement
21
 *
22
 * @method string         getType()        Element type. One of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”, “phone_number”, “email”.
23
 * @method string         getData()        Optional. Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal_details”, “passport”, “driver_license”, “identity_card”, “identity_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials.
24
 * @method string         getPhoneNumber() Optional. User's verified phone number, available only for “phone_number” type
25
 * @method string         getEmail()       Optional. User's verified email address, available only for “email” type
26
 * @method PassportFile[] getFiles()       Optional. Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
27
 * @method PassportFile   getFrontSide()   Optional. Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
28
 * @method PassportFile   getReverseSide() Optional. Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
29
 * @method PassportFile   getSelfie()      Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
30
 * @method PassportFile[] getTranslation() Optional. Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
31
 * @method string         getHash()        Base64-encoded element hash for using in PassportElementErrorUnspecified
32
 **/
33
class EncryptedPassportElement extends Entity
34
{
35
    /**
36
     * {@inheritdoc}
37
     */
38
    protected function subEntities()
39
    {
40
        return [
41
            'files'        => [PassportFile::class],
42
            'front_side'   => PassportFile::class,
43
            'reverse_side' => PassportFile::class,
44
            'selfie'       => PassportFile::class,
45
            'translation'  => [PassportFile::class],
46
        ];
47
    }
48
}
49