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

InlineQueryResultDocument   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 InlineQueryResultDocument
11
 *
12
 * @link https://core.telegram.org/bots/api#inlinequeryresultdocument
13
 *
14
 * <code>
15
 * $data = [
16
 *   'id'                    => '',
17
 *   'title'                 => '',
18
 *   'caption'               => '',
19
 *   'document_url'          => '',
20
 *   'mime_type'             => '',
21
 *   'description'           => '',
22
 *   'reply_markup'          => <InlineKeyboard>,
23
 *   'input_message_content' => <InputMessageContent>,
24
 *   'thumb_url'             => '',
25
 *   'thumb_width'           => 30,
26
 *   'thumb_height'          => 30,
27
 * ];
28
 * </code>
29
 *
30
 * @method string              getType()                    Type of the result, must be document
31
 * @method string              getId()                      Unique identifier for this result, 1-64 bytes
32
 * @method string              getTitle()                   Title for the result
33
 * @method string              getCaption()                 Optional. Caption of the document to be sent, 0-200 characters
34
 * @method string              getParseMode()               Optional. Mode for parsing entities in the document caption
35
 * @method MessageEntity[]     getCaptionEntities()         Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
36
 * @method string              getDocumentUrl()             A valid URL for the file
37
 * @method string              getMimeType()                Mime type of the content of the file, either “application/pdf” or “application/zip”
38
 * @method string              getDescription()             Optional. Short description of the result
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 file
41
 * @method string              getThumbUrl()                Optional. URL of the thumbnail (jpeg only) for the file
42
 * @method int                 getThumbWidth()              Optional. Thumbnail width
43
 * @method int                 getThumbHeight()             Optional. Thumbnail height
44
 *
45
 * @method $this setId(string $id)                                                      Unique identifier for this result, 1-64 bytes
46
 * @method $this setTitle(string $title)                                                Title for the result
47
 * @method $this setCaption(string $caption)                                            Optional. Caption of the document to be sent, 0-200 characters
48
 * @method $this setParseMode(string $parse_mode)                                       Optional. Mode for parsing entities in the document caption
49
 * @method $this setCaptionEntities(array $caption_entities)                            Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
50
 * @method $this setDocumentUrl(string $document_url)                                   A valid URL for the file
51
 * @method $this setMimeType(string $mime_type)                                         Mime type of the content of the file, either “application/pdf” or “application/zip”
52
 * @method $this setDescription(string $description)                                    Optional. Short description of the result
53
 * @method $this setReplyMarkup(InlineKeyboard $reply_markup)                           Optional. Inline keyboard attached to the message
54
 * @method $this setInputMessageContent(InputMessageContent $input_message_content)     Optional. Content of the message to be sent instead of the file
55
 * @method $this setThumbUrl(string $thumb_url)                                         Optional. URL of the thumbnail (jpeg only) for the file
56
 * @method $this setThumbWidth(int $thumb_width)                                        Optional. Thumbnail width
57
 * @method $this setThumbHeight(int $thumb_height)                                      Optional. Thumbnail height
58
 */
59
class InlineQueryResultDocument extends InlineEntity implements InlineQueryResult
60
{
61
62
    /**
63
     * InlineQueryResultDocument constructor
64
     *
65
     * @param array $data
66
     */
67
    public function __construct(array $data = [])
68
    {
69
        $data['type'] = 'document';
70
        parent::__construct($data);
71
    }
72
73
}
74