Completed
Push — develop ( 3eb150...ef9e39 )
by Armando
03:24
created

InlineQueryResultDocument   A

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