Completed
Push — develop ( 61b938...55698b )
by Armando
03:39
created

PassportElementErrorDataField   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 PassportElementErrorDataField
17
 *
18
 * Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.
19
 *
20
 * @link https://core.telegram.org/bots/api#passportelementerrordatafield
21
 *
22
 * @method string getSource()    Error source, must be data
23
 * @method string getType()      The section of the user's Telegram Passport which has the error, one of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”
24
 * @method string getFieldName() Name of the data field which has the error
25
 * @method string getDataHash()  Base64-encoded data hash
26
 * @method string getMessage()   Error message
27
 */
28
class PassportElementErrorDataField extends Entity implements PassportElementError
29
{
30
    /**
31
     * PassportElementErrorDataField constructor
32
     *
33
     * @param array $data
34
     *
35
     * @throws \Longman\TelegramBot\Exception\TelegramException
36
     */
37
    public function __construct(array $data = [])
38
    {
39
        $data['source'] = 'data';
40
        parent::__construct($data);
41
    }
42
}
43