Completed
Push — bot_api_4.0_passport ( 3dbf45...ff8d06 )
by Armando
02:45
created

PassportElementErrorUnspecified::__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
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
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 PassportElementErrorUnspecified
17
 *
18
 * Represents an issue in an unspecified place. The error is considered resolved when new data is added.
19
 *
20
 * @link https://core.telegram.org/bots/api#passportelementerrorunspecified
21
 *
22
 * @method string getSource()      Error source, must be unspecified
23
 * @method string getType()        Type of element of the user's Telegram Passport which has the issue
24
 * @method string getElementHash() Base64-encoded element hash
25
 * @method string getMessage()     Error message
26
 */
27
class PassportElementErrorUnspecified extends Entity implements PassportElementError
28
{
29
    /**
30
     * PassportElementErrorUnspecified constructor
31
     *
32
     * @param array $data
33
     *
34
     * @throws \Longman\TelegramBot\Exception\TelegramException
35
     */
36
    public function __construct(array $data = [])
37
    {
38
        $data['source'] = 'unspecified';
39
        parent::__construct($data);
40
    }
41
}
42