Passed
Push — master ( 4c2b59...061776 )
by Shahrad
02:09
created

InlineQueryResultGif   A

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