Passed
Pull Request — develop (#1077)
by Marco
02:09
created

InlineQueryResultMpeg4Gif   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 11
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
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 PhpTelegramBot\Core\Entities\InlineQuery;
13
14
use PhpTelegramBot\Core\Entities\InlineKeyboard;
15
use PhpTelegramBot\Core\Entities\InputMessageContent\InputMessageContent;
16
17
/**
18
 * Class InlineQueryResultMpeg4Gif
19
 *
20
 * @link https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif
21
 *
22
 * <code>
23
 * $data = [
24
 *   'id'                    => '',
25
 *   'mpeg4_url'             => '',
26
 *   'mpeg4_width'           => 30,
27
 *   'mpeg4_height'          => 30,
28
 *   'thumb_url'             => '',
29
 *   'title'                 => '',
30
 *   'caption'               => '',
31
 *   'reply_markup'          => <InlineKeyboard>,
32
 *   'input_message_content' => <InputMessageContent>,
33
 * ];
34
 * </code>
35
 *
36
 * @method string               getType()                Type of the result, must be mpeg4_gif
37
 * @method string               getId()                  Unique identifier for this result, 1-64 bytes
38
 * @method string               getMpeg4Url()            A valid URL for the MP4 file. File size must not exceed 1MB
39
 * @method int                  getMpeg4Width()          Optional. Video width
40
 * @method int                  getMpeg4Height()         Optional. Video height
41
 * @method int                  getMpeg4Duration()       Optional. Video duration
42
 * @method string               getThumbUrl()            URL of the static thumbnail (jpeg or gif) for the result
43
 * @method string               getTitle()               Optional. Title for the result
44
 * @method string               getCaption()             Optional. Caption of the MPEG-4 file to be sent, 0-200 characters
45
 * @method InlineKeyboard       getReplyMarkup()         Optional. Inline keyboard attached to the message
46
 * @method InputMessageContent  getInputMessageContent() Optional. Content of the message to be sent instead of the video animation
47
 *
48
 * @method $this setId(string $id)                                                  Unique identifier for this result, 1-64 bytes
49
 * @method $this setMpeg4Url(string $mpeg4_url)                                     A valid URL for the MP4 file. File size must not exceed 1MB
50
 * @method $this setMpeg4Width(int $mpeg4_width)                                    Optional. Video width
51
 * @method $this setMpeg4Height(int $mpeg4_height)                                  Optional. Video height
52
 * @method $this setMpeg4Duration(int $mpeg4_duration)                              Optional. Video duration
53
 * @method $this setThumbUrl(string $thumb_url)                                     URL of the static thumbnail (jpeg or gif) for the result
54
 * @method $this setTitle(string $title)                                            Optional. Title for the result
55
 * @method $this setCaption(string $caption)                                        Optional. Caption of the MPEG-4 file to be sent, 0-200 characters
56
 * @method $this setReplyMarkup(InlineKeyboard $reply_markup)                       Optional. Inline keyboard attached to the message
57
 * @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the video animation
58
 */
59
class InlineQueryResultMpeg4Gif extends InlineEntity implements InlineQueryResult
60
{
61
    /**
62
     * InlineQueryResultMpeg4Gif constructor
63
     *
64
     * @param array $data
65
     */
66
    public function __construct(array $data = [])
67
    {
68
        $data['type'] = 'mpeg4_gif';
69
        parent::__construct($data);
70
    }
71
}
72