Completed
Push — master ( e9eebf...b866da )
by Gusev
03:01
created

Text   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 90
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 90
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getMessageText() 0 4 1
A setMessageText() 0 4 1
A getParseMode() 0 4 1
A setParseMode() 0 4 1
A isDisableWebPagePreview() 0 4 1
A setDisableWebPagePreview() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: iGusev
5
 * Date: 14/04/16
6
 * Time: 14:41
7
 */
8
9
namespace TelegramBot\Api\Types\Inline\InputMessageContent;
10
11
use TelegramBot\Api\BaseType;
12
use TelegramBot\Api\TypeInterface;
13
14
/**
15
 * Class Text
16
 * @see https://core.telegram.org/bots/api#inputtextmessagecontent
17
 * 
18
 * Represents the content of a text message to be sent as the result of an inline query.
19
 *
20
 * @package TelegramBot\Api\Types\Inline\InputMessageContent
21
 */
22
class Text extends BaseType implements TypeInterface
23
{
24
    /**
25
     * {@inheritdoc}
26
     *
27
     * @var array
28
     */
29
    static protected $requiredParams = ['message_text'];
30
31
    /**
32
     * {@inheritdoc}
33
     *
34
     * @var array
35
     */
36
    static protected $map = [
37
        'message_text' => true,
38
        'parse_mode' => true,
39
        'disable_web_page_preview' => true,
40
    ];
41
42
    /**
43
     * Text of the message to be sent, 1-4096 characters
44
     *
45
     * @var string
46
     */
47
    protected $messageText;
48
49
    /**
50
     * Optional. Send Markdown or HTML,
51
     * if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.
52
     *
53
     * @var string
54
     */
55
    protected $parseMode;
56
57
    /**
58
     * Optional. Disables link previews for links in the sent message
59
     *
60
     * @var bool
61
     */
62
    protected $disableWebPagePreview;
63
64
    /**
65
     * @return string
66
     */
67
    public function getMessageText()
68
    {
69
        return $this->messageText;
70
    }
71
72
    /**
73
     * @param string $messageText
74
     */
75
    public function setMessageText($messageText)
76
    {
77
        $this->messageText = $messageText;
78
    }
79
80
    /**
81
     * @return string
82
     */
83
    public function getParseMode()
84
    {
85
        return $this->parseMode;
86
    }
87
88
    /**
89
     * @param string $parseMode
90
     */
91
    public function setParseMode($parseMode)
92
    {
93
        $this->parseMode = $parseMode;
94
    }
95
96
    /**
97
     * @return boolean
98
     */
99
    public function isDisableWebPagePreview()
100
    {
101
        return $this->disableWebPagePreview;
102
    }
103
104
    /**
105
     * @param boolean $disableWebPagePreview
106
     */
107
    public function setDisableWebPagePreview($disableWebPagePreview)
108
    {
109
        $this->disableWebPagePreview = $disableWebPagePreview;
110
    }
111
}
112