PassportElementErrorFiles::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 1
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 Entities\TelegramPassport\PassportElementError;
13
14
use Longman\TelegramBot\Entities\Entity;
15
16
/**
17
 * Class PassportElementErrorFiles
18
 *
19
 * Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.
20
 *
21
 * @link https://core.telegram.org/bots/api#passportelementerrorfiles
22
 *
23
 * @method string   getSource()     Error source, must be files
24
 * @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”
25
 * @method string[] getFileHashes() List of base64-encoded file hashes
26
 * @method string   getMessage()    Error message
27
 */
28
class PassportElementErrorFiles extends Entity implements PassportElementError
29
{
30
    /**
31
     * PassportElementErrorFiles constructor
32
     *
33
     * @param array $data
34
     */
35
    public function __construct(array $data = [])
36
    {
37
        $data['source'] = 'files';
38
        parent::__construct($data);
39
    }
40
}
41