ReplyKeyboardRemove::getSelective()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 0
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace TelegramBot\Api\Types;
4
5
use TelegramBot\Api\BaseType;
6
7
/**
8
 * Class ReplyKeyboardRemove
9
 * Upon receiving a message with this object,
10
 * Telegram clients will remove the current custom keyboard and display the default letter-keyboard.
11
 *
12
 * @package TelegramBot\Api\Types
13
 */
14
class ReplyKeyboardRemove extends BaseType
15
{
16
    /**
17
     * {@inheritdoc}
18
     *
19
     * @var array
20
     */
21
    protected static $requiredParams = ['remove_keyboard'];
22
23
    /**
24
     * {@inheritdoc}
25
     *
26
     * @var array
27
     */
28
    protected static $map = [
29
        'remove_keyboard' => true,
30
        'selective' => true
31
    ];
32
33
    /**
34
     * Requests clients to remove the custom keyboard (user will not be able to summon this keyboard;
35
     * if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)
36
     *
37
     * @var bool
38
     */
39
    protected $removeKeyboard;
40
41
    /**
42
     * Optional. Use this parameter if you want to remove the keyboard for specific users only.
43
     * Targets:
44
     * 1) users that are @mentioned in the text of the Message object;
45
     * 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
46
     *
47
     * @var bool|null
48
     */
49
    protected $selective;
50
51
    /**
52
     * @param bool $removeKeyboard
53
     * @param bool $selective
54
     */
55
    public function __construct($removeKeyboard = true, $selective = false)
56
    {
57
        $this->removeKeyboard = $removeKeyboard;
58
        $this->selective = $selective;
59
    }
60
61
    /**
62
     * @return bool
63
     */
64
    public function getRemoveKeyboard()
65
    {
66
        return $this->removeKeyboard;
67
    }
68
69
    /**
70
     * @param bool $removeKeyboard
71
     * @return void
72
     */
73
    public function setRemoveKeyboard($removeKeyboard)
74
    {
75
        $this->removeKeyboard = $removeKeyboard;
76
    }
77
78
    /**
79
     * @return bool|null
80
     */
81
    public function getSelective()
82
    {
83
        return $this->selective;
84
    }
85
86
    /**
87
     * @param bool|null $selective
88
     * @return void
89
     */
90
    public function setSelective($selective)
91
    {
92
        $this->selective = $selective;
93
    }
94
}
95