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

ReplyToMessage   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
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 19
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 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 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