ForceReply::setSelective()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zanzara\Telegram\Type\Miscellaneous;
6
7
/**
8
 * Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the
9
 * user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create
10
 * user-friendly step-by-step interfaces without having to sacrifice privacy mode.
11
 *
12
 * More on https://core.telegram.org/bots/api#forcereply
13
 */
14
class ForceReply
15
{
16
17
    /**
18
     * Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'
19
     *
20
     * @var bool
21
     */
22
    private $force_reply;
23
24
    /**
25
     * Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are
26
     * @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender
27
     * of the original message.
28
     *
29
     * @var bool|null
30
     */
31
    private $selective;
32
33
    /**
34
     * @return bool
35
     */
36
    public function isForceReply(): bool
37
    {
38
        return $this->force_reply;
39
    }
40
41
    /**
42
     * @param bool $force_reply
43
     */
44
    public function setForceReply(bool $force_reply): void
45
    {
46
        $this->force_reply = $force_reply;
47
    }
48
49
    /**
50
     * @return bool|null
51
     */
52
    public function getSelective(): ?bool
53
    {
54
        return $this->selective;
55
    }
56
57
    /**
58
     * @param bool|null $selective
59
     */
60
    public function setSelective(?bool $selective): void
61
    {
62
        $this->selective = $selective;
63
    }
64
65
}