InlineQueryResultArticle   A
last analyzed

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