Completed
Pull Request — develop (#291)
by Armando
13:31
created

InlineQueryResultCachedVoice   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 15
rs 10

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 Longman\TelegramBot\Entities\InlineQuery;
12
13
use Longman\TelegramBot\Entities\InlineKeyboardMarkup;
14
use Longman\TelegramBot\Entities\InputMessageContent\InputMessageContent;
15
16
/**
17
 * Class InlineQueryResultCachedVoice
18
 *
19
 * @link https://core.telegram.org/bots/api#inlinequeryresultcachedvoice
20
 *
21
 * <code>
22
 * $data = [
23
 *   'id'                    => '',
24
 *   'voice_file_id'         => '',
25
 *   'title'                 => '',
26
 *   'reply_markup'          => <InlineKeyboardMarkup>,
27
 *   'input_message_content' => <InputMessageContent>,
28
 * ];
29
 * </code>
30
 *
31
 * @method string               getType()                Type of the result, must be voice
32
 * @method string               getId()                  Unique identifier for this result, 1-64 bytes
33
 * @method string               getVoiceFileId()         A valid file identifier for the voice message
34
 * @method string               getTitle()               Voice message title
35
 * @method InlineKeyboardMarkup getReplyMarkup()         Optional. An Inline keyboard attached to the message
36
 * @method InputMessageContent  getInputMessageContent() Optional. Content of the message to be sent instead of the voice message
37
 *
38
 * @method $this setId(string $id)                                                  Unique identifier for this result, 1-64 bytes
39
 * @method $this setVoiceFileId(string $voice_file_id)                              A valid file identifier for the voice message
40
 * @method $this setTitle(string $title)                                            Voice message title
41
 * @method $this setReplyMarkup(InlineKeyboardMarkup $reply_markup)                 Optional. An Inline keyboard attached to the message
42
 * @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the voice message
43
 */
44
class InlineQueryResultCachedVoice extends InlineEntity
45
{
46
    /**
47
     * InlineQueryResultCachedVoice constructor
48
     *
49
     * @param array $data
50
     *
51
     * @throws \Longman\TelegramBot\Exception\TelegramException
52
     */
53
    public function __construct(array $data = [])
54
    {
55
        $data['type'] = 'voice';
56
        parent::__construct($data);
57
    }
58
}
59