PassportElementErrorFrontSide   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 11
ccs 0
cts 3
cp 0
rs 10
c 1
b 0
f 0
wmc 1

1 Method

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