InlineQueryResultArticle   A
last analyzed

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
8
/**
9
 * Class InlineQueryResultArticle
10
 *
11
 * @link https://core.telegram.org/bots/api#inlinequeryresultarticle
12
 *
13
 * <code>
14
 * $data = [
15
 *   'id'                    => '',
16
 *   'title'                 => '',
17
 *   'input_message_content' => <InputMessageContent>,
18
 *   'reply_markup'          => <InlineKeyboard>,
19
 *   'url'                   => '',
20
 *   'hide_url'              => true,
21
 *   'description'           => '',
22
 *   'thumb_url'             => '',
23
 *   'thumb_width'           => 30,
24
 *   'thumb_height'          => 30,
25
 * ];
26
 * </code>
27
 *
28
 * @method string               getType()                Type of the result, must be article
29
 * @method string               getId()                  Unique identifier for this result, 1-64 Bytes
30
 * @method string               getTitle()               Title of the result
31
 * @method InputMessageContent  getInputMessageContent() Content of the message to be sent
32
 * @method InlineKeyboard       getReplyMarkup()         Optional. Inline keyboard attached to the message
33
 * @method string               getUrl()                 Optional. URL of the result
34
 * @method bool                 getHideUrl()             Optional. Pass True, if you don't want the URL to be shown in the message
35
 * @method string               getDescription()         Optional. Short description of the result
36
 * @method string               getThumbUrl()            Optional. Url of the thumbnail for the result
37
 * @method int                  getThumbWidth()          Optional. Thumbnail width
38
 * @method int                  getThumbHeight()         Optional. Thumbnail height
39
 *
40
 * @method $this setId(string $id)                                                  Unique identifier for this result, 1-64 Bytes
41
 * @method $this setTitle(string $title)                                            Title of the result
42
 * @method $this setInputMessageContent(InputMessageContent $input_message_content) Content of the message to be sent
43
 * @method $this setReplyMarkup(InlineKeyboard $reply_markup)                       Optional. Inline keyboard attached to the message
44
 * @method $this setUrl(string $url)                                                Optional. URL of the result
45
 * @method $this setHideUrl(bool $hide_url)                                         Optional. Pass True, if you don't want the URL to be shown in the message
46
 * @method $this setDescription(string $description)                                Optional. Short description of the result
47
 * @method $this setThumbUrl(string $thumb_url)                                     Optional. Url of the thumbnail for the result
48
 * @method $this setThumbWidth(int $thumb_width)                                    Optional. Thumbnail width
49
 * @method $this setThumbHeight(int $thumb_height)                                  Optional. Thumbnail height
50
 */
51
class InlineQueryResultArticle extends InlineEntity implements InlineQueryResult
52
{
53
54
    /**
55
     * InlineQueryResultArticle constructor
56
     *
57
     * @param array $data
58
     */
59
    public function __construct(array $data = [])
60
    {
61
        $data['type'] = 'article';
62
        parent::__construct($data);
63
    }
64
65
}
66