InlineQueryResultCachedVoice::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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