InlineQueryResultAudio   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 15
ccs 0
cts 5
cp 0
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\InlineKeyboard;
14
use Longman\TelegramBot\Entities\InputMessageContent\InputMessageContent;
15
16
/**
17
 * Class InlineQueryResultAudio
18
 *
19
 * @link https://core.telegram.org/bots/api#inlinequeryresultaudio
20
 *
21
 * <code>
22
 * $data = [
23
 *   'id'                    => '',
24
 *   'audio_url'             => '',
25
 *   'title'                 => '',
26
 *   'caption'               => '',
27
 *   'performer'             => '',
28
 *   'audio_duration'        => 123,
29
 *   'reply_markup'          => <InlineKeyboard>,
30
 *   'input_message_content' => <InputMessageContent>,
31
 * ];
32
 * </code>
33
 *
34
 * @method string               getType()                Type of the result, must be audio
35
 * @method string               getId()                  Unique identifier for this result, 1-64 bytes
36
 * @method string               getAudioUrl()            A valid URL for the audio file
37
 * @method string               getTitle()               Title
38
 * @method string               getCaption()             Optional. Caption, 0-200 characters
39
 * @method string               getPerformer()           Optional. Performer
40
 * @method int                  getAudioDuration()       Optional. Audio duration in seconds
41
 * @method InlineKeyboard       getReplyMarkup()         Optional. Inline keyboard attached to the message
42
 * @method InputMessageContent  getInputMessageContent() Optional. Content of the message to be sent instead of the audio
43
 *
44
 * @method $this setId(string $id)                                                  Unique identifier for this result, 1-64 bytes
45
 * @method $this setAudioUrl(string $audio_url)                                     A valid URL for the audio file
46
 * @method $this setTitle(string $title)                                            Title
47
 * @method $this setCaption(string $caption)                                        Optional. Caption, 0-200 characters
48
 * @method $this setPerformer(string $performer)                                    Optional. Performer
49
 * @method $this setAudioDuration(int $audio_duration)                              Optional. Audio duration in seconds
50
 * @method $this setReplyMarkup(InlineKeyboard $reply_markup)                       Optional. Inline keyboard attached to the message
51
 * @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the audio
52
 */
53
class InlineQueryResultAudio extends InlineEntity
54
{
55
    /**
56
     * InlineQueryResultAudio constructor
57
     *
58
     * @param array $data
59
     *
60
     * @throws \Longman\TelegramBot\Exception\TelegramException
61
     */
62
    public function __construct(array $data = [])
63
    {
64
        $data['type'] = 'audio';
65
        parent::__construct($data);
66
    }
67
}
68