Completed
Pull Request — develop (#291)
by Armando
03:42
created

ReplyToMessage::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
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 Longman\TelegramBot\Entities;
12
13
/**
14
 * Class ReplyToMessage
15
 *
16
 * @todo Is this even required?!
17
 */
18
class ReplyToMessage extends Message
19
{
20
    /**
21
     * ReplyToMessage constructor.
22
     *
23
     * @param array  $data
24
     * @param string $bot_name
25
     *
26
     * @throws \Longman\TelegramBot\Exception\TelegramException
27
     */
28
    public function __construct(array $data, $bot_name = '')
29
    {
30
        //As explained in the documentation
31
        //Reply to message can't contain other reply to message entities
32
        unset($data['reply_to_message']);
33
34
        parent::__construct($data, $bot_name);
35
    }
36
}
37