InlineQueryResultGif   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

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 Longman\TelegramBot\Entities\InlineQuery;
13
14
use Longman\TelegramBot\Entities\InlineKeyboard;
15
use Longman\TelegramBot\Entities\InputMessageContent\InputMessageContent;
16
17
/**
18
 * Class InlineQueryResultGif
19
 *
20
 * @link https://core.telegram.org/bots/api#inlinequeryresultgif
21
 *
22
 * <code>
23
 * $data = [
24
 *   'id'                    => '',
25
 *   'gif_url'               => '',
26
 *   'gif_width'             => 30,
27
 *   'gif_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 gif
37
 * @method string               getId()                  Unique identifier for this result, 1-64 bytes
38
 * @method string               getGifUrl()              A valid URL for the GIF file. File size must not exceed 1MB
39
 * @method int                  getGifWidth()            Optional. Width of the GIF
40
 * @method int                  getGifHeight()           Optional. Height of the GIF
41
 * @method int                  getGifDuration()         Optional. Duration of the GIF
42
 * @method string               getThumbUrl()            URL of the static thumbnail for the result (jpeg or gif)
43
 * @method string               getTitle()               Optional. Title for the result
44
 * @method string               getCaption()             Optional. Caption of the GIF file to be sent, 0-200 characters
45
 * @method string               getParseMode()           Optional. Mode for parsing entities in the caption
46
 * @method MessageEntity[]      getCaptionEntities()     Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
47
 * @method InlineKeyboard       getReplyMarkup()         Optional. Inline keyboard attached to the message
48
 * @method InputMessageContent  getInputMessageContent() Optional. Content of the message to be sent instead of the GIF animation
49
 *
50
 * @method $this setId(string $id)                                                  Unique identifier for this result, 1-64 bytes
51
 * @method $this setGifUrl(string $gif_url)                                         A valid URL for the GIF file. File size must not exceed 1MB
52
 * @method $this setGifWidth(int $gif_width)                                        Optional. Width of the GIF
53
 * @method $this setGifHeight(int $gif_height)                                      Optional. Height of the GIF
54
 * @method $this setGifDuration(int $gif_duration)                                  Optional.  Duration of the GIF
55
 * @method $this setThumbUrl(string $thumb_url)                                     URL of the static thumbnail for the result (jpeg or gif)
56
 * @method $this setTitle(string $title)                                            Optional. Title for the result
57
 * @method $this setCaption(string $caption)                                        Optional. Caption of the GIF file to be sent, 0-200 characters
58
 * @method $this setParseMode(string $parse_mode)                                   Optional. Mode for parsing entities in the caption
59
 * @method $this setCaptionEntities(array $caption_entities)                        Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
60
 * @method $this setReplyMarkup(InlineKeyboard $reply_markup)                       Optional. Inline keyboard attached to the message
61
 * @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the GIF animation
62
 */
63
class InlineQueryResultGif extends InlineEntity implements InlineQueryResult
64
{
65
    /**
66
     * InlineQueryResultGif constructor
67
     *
68
     * @param array $data
69
     */
70
    public function __construct(array $data = [])
71
    {
72
        $data['type'] = 'gif';
73
        parent::__construct($data);
74
    }
75
}
76