InlineQueryResultCachedDocument   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 InlineQueryResultCachedDocument
19
 *
20
 * @link https://core.telegram.org/bots/api#inlinequeryresultcacheddocument
21
 *
22
 * <code>
23
 * $data = [
24
 *   'id'                    => '',
25
 *   'title'                 => '',
26
 *   'document_file_id'      => '',
27
 *   'description'           => '',
28
 *   'caption'               => '',
29
 *   'reply_markup'          => <InlineKeyboard>,
30
 *   'input_message_content' => <InputMessageContent>,
31
 * ];
32
 * </code>
33
 *
34
 * @method string               getType()                Type of the result, must be document
35
 * @method string               getId()                  Unique identifier for this result, 1-64 bytes
36
 * @method string               getTitle()               Title for the result
37
 * @method string               getDocumentFileId()      A valid file identifier for the file
38
 * @method string               getDescription()         Optional. Short description of the result
39
 * @method string               getCaption()             Optional. Caption of the document to be sent, 0-200 characters
40
 * @method string               getParseMode()           Optional. Mode for parsing entities in the document caption
41
 * @method MessageEntity[]      getCaptionEntities()     Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
42
 * @method InlineKeyboard       getReplyMarkup()         Optional. An Inline keyboard attached to the message
43
 * @method InputMessageContent  getInputMessageContent() Optional. Content of the message to be sent instead of the file
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 setDocumentFileId(string $document_file_id)                        A valid file identifier for the file
48
 * @method $this setDescription(string $description)                                Optional. Short description of the result
49
 * @method $this setCaption(string $caption)                                        Optional. Caption of the document to be sent, 0-200 characters
50
 * @method $this setParseMode(string $parse_mode)                                   Optional. Mode for parsing entities in the document 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. An 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 file
54
 */
55
class InlineQueryResultCachedDocument extends InlineEntity implements InlineQueryResult
56
{
57
    /**
58
     * InlineQueryResultCachedDocument constructor
59
     *
60
     * @param array $data
61
     */
62
    public function __construct(array $data = [])
63
    {
64
        $data['type'] = 'document';
65
        parent::__construct($data);
66
    }
67
}
68