InlineQueryResultAudio   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 12
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 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 InlineQueryResultAudio
11
 *
12
 * @link https://core.telegram.org/bots/api#inlinequeryresultaudio
13
 *
14
 * <code>
15
 * $data = [
16
 *   'id'                    => '',
17
 *   'audio_url'             => '',
18
 *   'title'                 => '',
19
 *   'caption'               => '',
20
 *   'performer'             => '',
21
 *   'audio_duration'        => 123,
22
 *   'reply_markup'          => <InlineKeyboard>,
23
 *   'input_message_content' => <InputMessageContent>,
24
 * ];
25
 * </code>
26
 *
27
 * @method string               getType()                Type of the result, must be audio
28
 * @method string               getId()                  Unique identifier for this result, 1-64 bytes
29
 * @method string               getAudioUrl()            A valid URL for the audio file
30
 * @method string               getTitle()               Title
31
 * @method string               getCaption()             Optional. Caption, 0-200 characters
32
 * @method string               getParseMode()           Optional. Mode for parsing entities in the audio caption
33
 * @method MessageEntity[]      getCaptionEntities()     Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
34
 * @method string               getPerformer()           Optional. Performer
35
 * @method int                  getAudioDuration()       Optional. Audio duration in seconds
36
 * @method InlineKeyboard       getReplyMarkup()         Optional. Inline keyboard attached to the message
37
 * @method InputMessageContent  getInputMessageContent() Optional. Content of the message to be sent instead of the audio
38
 *
39
 * @method $this setId(string $id)                                                  Unique identifier for this result, 1-64 bytes
40
 * @method $this setAudioUrl(string $audio_url)                                     A valid URL for the audio file
41
 * @method $this setTitle(string $title)                                            Title
42
 * @method $this setCaption(string $caption)                                        Optional. Caption, 0-200 characters
43
 * @method $this setParseMode(string $parse_mode)                                   Optional. Mode for parsing entities in the audio caption
44
 * @method $this setCaptionEntities(array $caption_entities)                        Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
45
 * @method $this setPerformer(string $performer)                                    Optional. Performer
46
 * @method $this setAudioDuration(int $audio_duration)                              Optional. Audio duration in seconds
47
 * @method $this setReplyMarkup(InlineKeyboard $reply_markup)                       Optional. Inline keyboard attached to the message
48
 * @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the audio
49
 */
50
class InlineQueryResultAudio extends InlineEntity implements InlineQueryResult
51
{
52
53
    /**
54
     * InlineQueryResultAudio constructor
55
     *
56
     * @param array $data
57
     */
58
    public function __construct(array $data = [])
59
    {
60
        $data['type'] = 'audio';
61
        parent::__construct($data);
62
    }
63
64
}
65