InlineQueryResultCachedVoice::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace TelegramBot\Entities\InlineQuery;
4
5
use TelegramBot\Entities\InlineKeyboard;
6
use TelegramBot\Entities\InputMessageContent\InputMessageContent;
7
use TelegramBot\Entities\MessageEntity;
8
9
/**
10
 * Class InlineQueryResultCachedVoice
11
 *
12
 * @link https://core.telegram.org/bots/api#inlinequeryresultcachedvoice
13
 *
14
 * <code>
15
 * $data = [
16
 *   'id'                    => '',
17
 *   'voice_file_id'         => '',
18
 *   'title'                 => '',
19
 *   'caption'               => '',
20
 *   'reply_markup'          => <InlineKeyboard>,
21
 *   'input_message_content' => <InputMessageContent>,
22
 * ];
23
 * </code>
24
 *
25
 * @method string               getType()                Type of the result, must be voice
26
 * @method string               getId()                  Unique identifier for this result, 1-64 bytes
27
 * @method string               getVoiceFileId()         A valid file identifier for the voice message
28
 * @method string               getTitle()               Voice message title
29
 * @method string               getCaption()             Optional. Caption, 0-200 characters
30
 * @method string               getParseMode()           Optional. Mode for parsing entities in the voice caption
31
 * @method MessageEntity[]      getCaptionEntities()     Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
32
 * @method InlineKeyboard       getReplyMarkup()         Optional. An Inline keyboard attached to the message
33
 * @method InputMessageContent  getInputMessageContent() Optional. Content of the message to be sent instead of the voice message
34
 *
35
 * @method $this setId(string $id)                                                  Unique identifier for this result, 1-64 bytes
36
 * @method $this setVoiceFileId(string $voice_file_id)                              A valid file identifier for the voice message
37
 * @method $this setTitle(string $title)                                            Voice message title
38
 * @method $this setCaption(string $caption)                                        Optional. Caption, 0-200 characters
39
 * @method $this setParseMode(string $parse_mode)                                   Optional. Mode for parsing entities in the voice caption
40
 * @method $this setCaptionEntities(array $caption_entities)                        Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
41
 * @method $this setReplyMarkup(InlineKeyboard $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 implements InlineQueryResult
45
{
46
47
    /**
48
     * InlineQueryResultCachedVoice constructor
49
     *
50
     * @param array $data
51
     */
52
    public function __construct(array $data = [])
53
    {
54
        $data['type'] = 'voice';
55
        parent::__construct($data);
56
    }
57
58
}
59