Completed
Push — master ( 770142...55698b )
by Armando
01:37
created

PassportElementErrorTranslationFile   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 15
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
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 Entities\TelegramPassport\PassportElementError;
12
13
use Longman\TelegramBot\Entities\Entity;
14
15
/**
16
 * Class PassportElementErrorTranslationFile
17
 *
18
 * Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.
19
 *
20
 * @link https://core.telegram.org/bots/api#passportelementerrortranslationfile
21
 *
22
 * @method string getSource()   Error source, must be translation_file
23
 * @method string getType()     Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”
24
 * @method string getFileHash() Base64-encoded translation_file hash
25
 * @method string getMessage()  Error message
26
 */
27
class PassportElementErrorTranslationFile extends Entity implements PassportElementError
28
{
29
    /**
30
     * PassportElementErrorTranslationFile constructor
31
     *
32
     * @param array $data
33
     *
34
     * @throws \Longman\TelegramBot\Exception\TelegramException
35
     */
36
    public function __construct(array $data = [])
37
    {
38
        $data['source'] = 'translation_file';
39
        parent::__construct($data);
40
    }
41
}
42