PassportElementErrorReverseSide::__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 PassportElementErrorReverseSide
18
 *
19
 * Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.
20
 *
21
 * @link https://core.telegram.org/bots/api#passportelementerrorreverseside
22
 *
23
 * @method string getSource()   Error source, must be reverse_side
24
 * @method string getType()     The section of the user's Telegram Passport which has the issue, one of “driver_license”, “identity_card”
25
 * @method string getFileHash() Base64-encoded hash of the file with the reverse side of the document
26
 * @method string getMessage()  Error message
27
 */
28
class PassportElementErrorReverseSide extends Entity implements PassportElementError
29
{
30
    /**
31
     * PassportElementErrorReverseSide constructor
32
     *
33
     * @param array $data
34
     */
35
    public function __construct(array $data = [])
36
    {
37
        $data['source'] = 'reverse_side';
38
        parent::__construct($data);
39
    }
40
}
41