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

PassportElementErrorFile::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
ccs 0
cts 5
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
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 PassportElementErrorFile
17
 *
18
 * Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
19
 *
20
 * @link https://core.telegram.org/bots/api#passportelementerrorfile
21
 *
22
 * @method string getSource()   Error source, must be file
23
 * @method string getType()     The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”
24
 * @method string getFileHash() Base64-encoded file hash
25
 * @method string getMessage()  Error message
26
 */
27
class PassportElementErrorFile extends Entity implements PassportElementError
28
{
29
    /**
30
     * PassportElementErrorFile constructor
31
     *
32
     * @param array $data
33
     *
34
     * @throws \Longman\TelegramBot\Exception\TelegramException
35
     */
36
    public function __construct(array $data = [])
37
    {
38
        $data['source'] = 'file';
39
        parent::__construct($data);
40
    }
41
}
42