ChatPermissions::setCanSendPolls()   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;
6
7
/**
8
 * Describes actions that a non-administrator user is allowed to take in a chat.
9
 *
10
 * More on https://core.telegram.org/bots/api#chatpermissions
11
 */
12
class ChatPermissions
13
{
14
15
    /**
16
     * Optional. True, if the user is allowed to send text messages, contacts, locations and venues
17
     *
18
     * @var bool|null
19
     */
20
    private $can_send_messages;
21
22
    /**
23
     * Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes,
24
     * implies can_send_messages
25
     *
26
     * @var bool|null
27
     */
28
    private $can_send_media_messages;
29
30
    /**
31
     * Optional. True, if the user is allowed to send polls, implies can_send_messages
32
     *
33
     * @var bool|null
34
     */
35
    private $can_send_polls;
36
37
    /**
38
     * Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies
39
     * can_send_media_messages
40
     *
41
     * @var bool|null
42
     */
43
    private $can_send_other_messages;
44
45
    /**
46
     * Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages
47
     *
48
     * @var bool|null
49
     */
50
    private $can_add_web_page_previews;
51
52
    /**
53
     * Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups
54
     *
55
     * @var bool|null
56
     */
57
    private $can_change_info;
58
59
    /**
60
     * Optional. True, if the user is allowed to invite new users to the chat
61
     *
62
     * @var bool|null
63
     */
64
    private $can_invite_users;
65
66
    /**
67
     * Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
68
     *
69
     * @var bool|null
70
     */
71
    private $can_pin_messages;
72
73
    /**
74
     * @return bool|null
75
     */
76
    public function getCanSendMessages(): ?bool
77
    {
78
        return $this->can_send_messages;
79
    }
80
81
    /**
82
     * @param bool|null $can_send_messages
83
     */
84
    public function setCanSendMessages(?bool $can_send_messages): void
85
    {
86
        $this->can_send_messages = $can_send_messages;
87
    }
88
89
    /**
90
     * @return bool|null
91
     */
92
    public function getCanSendMediaMessages(): ?bool
93
    {
94
        return $this->can_send_media_messages;
95
    }
96
97
    /**
98
     * @param bool|null $can_send_media_messages
99
     */
100
    public function setCanSendMediaMessages(?bool $can_send_media_messages): void
101
    {
102
        $this->can_send_media_messages = $can_send_media_messages;
103
    }
104
105
    /**
106
     * @return bool|null
107
     */
108
    public function getCanSendPolls(): ?bool
109
    {
110
        return $this->can_send_polls;
111
    }
112
113
    /**
114
     * @param bool|null $can_send_polls
115
     */
116
    public function setCanSendPolls(?bool $can_send_polls): void
117
    {
118
        $this->can_send_polls = $can_send_polls;
119
    }
120
121
    /**
122
     * @return bool|null
123
     */
124
    public function getCanSendOtherMessages(): ?bool
125
    {
126
        return $this->can_send_other_messages;
127
    }
128
129
    /**
130
     * @param bool|null $can_send_other_messages
131
     */
132
    public function setCanSendOtherMessages(?bool $can_send_other_messages): void
133
    {
134
        $this->can_send_other_messages = $can_send_other_messages;
135
    }
136
137
    /**
138
     * @return bool|null
139
     */
140
    public function getCanAddWebPagePreviews(): ?bool
141
    {
142
        return $this->can_add_web_page_previews;
143
    }
144
145
    /**
146
     * @param bool|null $can_add_web_page_previews
147
     */
148
    public function setCanAddWebPagePreviews(?bool $can_add_web_page_previews): void
149
    {
150
        $this->can_add_web_page_previews = $can_add_web_page_previews;
151
    }
152
153
    /**
154
     * @return bool|null
155
     */
156
    public function getCanChangeInfo(): ?bool
157
    {
158
        return $this->can_change_info;
159
    }
160
161
    /**
162
     * @param bool|null $can_change_info
163
     */
164
    public function setCanChangeInfo(?bool $can_change_info): void
165
    {
166
        $this->can_change_info = $can_change_info;
167
    }
168
169
    /**
170
     * @return bool|null
171
     */
172
    public function getCanInviteUsers(): ?bool
173
    {
174
        return $this->can_invite_users;
175
    }
176
177
    /**
178
     * @param bool|null $can_invite_users
179
     */
180
    public function setCanInviteUsers(?bool $can_invite_users): void
181
    {
182
        $this->can_invite_users = $can_invite_users;
183
    }
184
185
    /**
186
     * @return bool|null
187
     */
188
    public function getCanPinMessages(): ?bool
189
    {
190
        return $this->can_pin_messages;
191
    }
192
193
    /**
194
     * @param bool|null $can_pin_messages
195
     */
196
    public function setCanPinMessages(?bool $can_pin_messages): void
197
    {
198
        $this->can_pin_messages = $can_pin_messages;
199
    }
200
201
}