Completed
Push — master ( be22ff...83e3a1 )
by Alexander
20s queued 15s
created

WebAppData::setButtonText()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace TelegramBot\Api\Types;
4
5
use TelegramBot\Api\BaseType;
6
use TelegramBot\Api\TypeInterface;
7
8
class WebAppData extends BaseType implements TypeInterface
9
{
10
    /**
11
     * {@inheritdoc}
12
     *
13
     * @var array
14
     */
15
    protected static $requiredParams = ['data', 'button_text'];
16
17
    /**
18
     * {@inheritdoc}
19
     *
20
     * @var array
21
     */
22
    protected static $map = [
23
        'data' => true,
24
        'button_text' => true,
25
    ];
26
27
    /**
28
     * The data. Be aware that a bad client can send arbitrary data in this field.
29
     *
30
     * @var string
31
     */
32
    protected $data;
33
34
    /**
35
     * Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.
36
     *
37
     * @var string
38
     */
39
    protected $buttonText;
40
41
    /**
42
     * @return string
43
     */
44
    public function getData()
45
    {
46
        return $this->data;
47
    }
48
49
    /**
50
     * @param string $data
51
     * @return void
52
     */
53
    public function setData($data)
54
    {
55
        $this->data = $data;
56
    }
57
58
    /**
59
     * @return string
60
     */
61
    public function getButtonText()
62
    {
63
        return $this->buttonText;
64
    }
65
66
    /**
67
     * @param string $buttonText
68
     * @return void
69
     */
70
    public function setButtonText($buttonText)
71
    {
72
        $this->buttonText = $buttonText;
73
    }
74
}
75