@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public string $big_file_unique_id; |
38 | 38 | |
39 | 39 | |
40 | - public function __construct(stdClass|null $object = null) { |
|
40 | + public function __construct(stdClass | null $object = null) { |
|
41 | 41 | if ($object != null) { |
42 | 42 | parent::__construct($object, self::subs); |
43 | 43 | } |
@@ -59,8 +59,8 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @return bool|string string will be returned when destination doesn't set |
61 | 61 | */ |
62 | - public function download(string|null $destination = null,bool $big = true): bool|string { |
|
63 | - return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp4',$big ? $this->big_file_id : $this->small_file_id); |
|
62 | + public function download(string | null $destination = null, bool $big = true): bool | string { |
|
63 | + return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp4', $big ? $this->big_file_id : $this->small_file_id); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | public function link(bool $big = true): string { |
@@ -25,29 +25,29 @@ discard block |
||
25 | 25 | public int $duration; |
26 | 26 | |
27 | 27 | /** Optional. Performer of the audio as defined by sender or by audio tags */ |
28 | - public null|string $performer = null; |
|
28 | + public null | string $performer = null; |
|
29 | 29 | |
30 | 30 | /** Optional. Title of the audio as defined by sender or by audio tags */ |
31 | - public null|string $title = null; |
|
31 | + public null | string $title = null; |
|
32 | 32 | |
33 | 33 | /** Optional. Original filename as defined by sender */ |
34 | - public null|string $file_name = null; |
|
34 | + public null | string $file_name = null; |
|
35 | 35 | |
36 | 36 | /** Optional. MIME type of the file as defined by sender */ |
37 | - public null|string $mime_type = null; |
|
37 | + public null | string $mime_type = null; |
|
38 | 38 | |
39 | 39 | /** |
40 | 40 | * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have |
41 | 41 | * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit |
42 | 42 | * integer or double-precision float type are safe for storing this value. |
43 | 43 | */ |
44 | - public null|int $file_size = null; |
|
44 | + public null | int $file_size = null; |
|
45 | 45 | |
46 | 46 | /** Optional. Thumbnail of the album cover to which the music file belongs */ |
47 | - public null|photoSize $thumb = null; |
|
47 | + public null | photoSize $thumb = null; |
|
48 | 48 | |
49 | 49 | |
50 | - public function __construct(stdClass|null $object = null) { |
|
50 | + public function __construct(stdClass | null $object = null) { |
|
51 | 51 | if ($object != null) { |
52 | 52 | parent::__construct($object, self::subs); |
53 | 53 | } |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | * |
69 | 69 | * @return bool|string string will be returned when destination doesn't set |
70 | 70 | */ |
71 | - public function download(string|null $destination = null): bool|string { |
|
72 | - return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp3',$this->file_id); |
|
71 | + public function download(string | null $destination = null): bool | string { |
|
72 | + return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp3', $this->file_id); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | public function link(): string { |
@@ -31,28 +31,28 @@ |
||
31 | 31 | public bool $is_revoked; |
32 | 32 | |
33 | 33 | /** Optional. Invite link name */ |
34 | - public null|string $name = null; |
|
34 | + public null | string $name = null; |
|
35 | 35 | |
36 | 36 | /** Optional. Point in time (Unix timestamp) when the link will expire or has been expired */ |
37 | - public null|int $expire_date = null; |
|
37 | + public null | int $expire_date = null; |
|
38 | 38 | |
39 | 39 | /** |
40 | 40 | * Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat |
41 | 41 | * via this invite link; 1-99999 |
42 | 42 | */ |
43 | - public null|int $member_limit = null; |
|
43 | + public null | int $member_limit = null; |
|
44 | 44 | |
45 | 45 | /** Optional. Number of pending join requests created using this link */ |
46 | - public null|int $pending_join_request_count = null; |
|
46 | + public null | int $pending_join_request_count = null; |
|
47 | 47 | |
48 | 48 | |
49 | - public function __construct(stdClass|null $object = null) { |
|
49 | + public function __construct(stdClass | null $object = null) { |
|
50 | 50 | if ($object != null) { |
51 | 51 | parent::__construct($object, self::subs); |
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
55 | - public function revoke(): self|responseError|bool { |
|
55 | + public function revoke(): self | responseError | bool { |
|
56 | 56 | return $this->is_revoked ?? telegram::revokeChatInviteLink($this->invite_link); |
57 | 57 | } |
58 | 58 | } |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | public int $message_id; |
64 | 64 | |
65 | 65 | /** Optional. Unique identifier of a message thread to which the message belongs; for supergroups only */ |
66 | - public null|int $message_thread_id = null; |
|
66 | + public null | int $message_thread_id = null; |
|
67 | 67 | |
68 | 68 | /** |
69 | 69 | * Optional. Sender of the message; empty for messages sent to channels. For backward compatibility, the field |
70 | 70 | * contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. |
71 | 71 | */ |
72 | - public null|user $from = null; |
|
72 | + public null | user $from = null; |
|
73 | 73 | |
74 | 74 | /** |
75 | 75 | * Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake |
78 | 78 | * sender user in non-channel chats, if the message was sent on behalf of a chat. |
79 | 79 | */ |
80 | - public null|chat $sender_chat = null; |
|
80 | + public null | chat $sender_chat = null; |
|
81 | 81 | |
82 | 82 | /** Date the message was sent in Unix time */ |
83 | 83 | public int $date; |
@@ -86,185 +86,185 @@ discard block |
||
86 | 86 | public chat $chat; |
87 | 87 | |
88 | 88 | /** Optional. For forwarded messages, sender of the original message */ |
89 | - public null|user $forward_from = null; |
|
89 | + public null | user $forward_from = null; |
|
90 | 90 | |
91 | 91 | /** |
92 | 92 | * Optional. For messages forwarded from channels or from anonymous administrators, information about the |
93 | 93 | * original sender chat |
94 | 94 | */ |
95 | - public null|chat $forward_from_chat = null; |
|
95 | + public null | chat $forward_from_chat = null; |
|
96 | 96 | |
97 | 97 | /** Optional. For messages forwarded from channels, identifier of the original message in the channel */ |
98 | - public null|int $forward_from_message_id = null; |
|
98 | + public null | int $forward_from_message_id = null; |
|
99 | 99 | |
100 | 100 | /** |
101 | 101 | * Optional. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, |
102 | 102 | * signature of the message sender if present |
103 | 103 | */ |
104 | - public null|string $forward_signature = null; |
|
104 | + public null | string $forward_signature = null; |
|
105 | 105 | |
106 | 106 | /** |
107 | 107 | * Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in |
108 | 108 | * forwarded messages |
109 | 109 | */ |
110 | - public null|string $forward_sender_name = null; |
|
110 | + public null | string $forward_sender_name = null; |
|
111 | 111 | |
112 | 112 | /** Optional. For forwarded messages, date the original message was sent in Unix time */ |
113 | - public null|int $forward_date = null; |
|
113 | + public null | int $forward_date = null; |
|
114 | 114 | |
115 | 115 | /** Optional. True, if the message is sent to a forum topic */ |
116 | - public null|bool $is_topic_message = null; |
|
116 | + public null | bool $is_topic_message = null; |
|
117 | 117 | |
118 | 118 | /** |
119 | 119 | * Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion |
120 | 120 | * group |
121 | 121 | */ |
122 | - public null|bool $is_automatic_forward = null; |
|
122 | + public null | bool $is_automatic_forward = null; |
|
123 | 123 | |
124 | 124 | /** |
125 | 125 | * Optional. For replies, the original message. Note that the Message object in this field will not contain |
126 | 126 | * further reply_to_message fields even if it itself is a reply. |
127 | 127 | */ |
128 | - public null|message $reply_to_message = null; |
|
128 | + public null | message $reply_to_message = null; |
|
129 | 129 | |
130 | 130 | /** Optional. Bot through which the message was sent */ |
131 | - public null|user $via_bot = null; |
|
131 | + public null | user $via_bot = null; |
|
132 | 132 | |
133 | 133 | /** Optional. Date the message was last edited in Unix time */ |
134 | - public null|int $edit_date = null; |
|
134 | + public null | int $edit_date = null; |
|
135 | 135 | |
136 | 136 | /** Optional. True, if the message can't be forwarded */ |
137 | - public null|bool $has_protected_content = null; |
|
137 | + public null | bool $has_protected_content = null; |
|
138 | 138 | |
139 | 139 | /** Optional. The unique identifier of a media message group this message belongs to */ |
140 | - public null|string $media_group_id = null; |
|
140 | + public null | string $media_group_id = null; |
|
141 | 141 | |
142 | 142 | /** |
143 | 143 | * Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group |
144 | 144 | * administrator |
145 | 145 | */ |
146 | - public null|string $author_signature = null; |
|
146 | + public null | string $author_signature = null; |
|
147 | 147 | |
148 | 148 | /** Optional. For text messages, the actual UTF-8 text of the message */ |
149 | - public null|string $text = null; |
|
149 | + public null | string $text = null; |
|
150 | 150 | |
151 | 151 | /** Optional. If user message was a commend , this parameter will be the commend */ |
152 | - public string|null $commend = null; |
|
152 | + public string | null $commend = null; |
|
153 | 153 | |
154 | 154 | /** Optional. If user message was a commend , this parameter will be the commend username(if exist) */ |
155 | - public string|null $commend_username = null; |
|
155 | + public string | null $commend_username = null; |
|
156 | 156 | |
157 | 157 | /** Optional. If user message was a commend , this parameter will be the commend payload(if exist) */ |
158 | - public string|null $commend_payload = null; |
|
158 | + public string | null $commend_payload = null; |
|
159 | 159 | |
160 | 160 | /** |
161 | 161 | * Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text |
162 | 162 | * @var messageEntity[] |
163 | 163 | */ |
164 | - public null|array $entities = null; |
|
164 | + public null | array $entities = null; |
|
165 | 165 | |
166 | 166 | /** |
167 | 167 | * Optional. Message is an animation, information about the animation. For backward compatibility, when this |
168 | 168 | * field is set, the document field will also be set |
169 | 169 | */ |
170 | - public null|animation $animation = null; |
|
170 | + public null | animation $animation = null; |
|
171 | 171 | |
172 | 172 | /** Optional. Message is an audio file, information about the file */ |
173 | - public null|audio $audio = null; |
|
173 | + public null | audio $audio = null; |
|
174 | 174 | |
175 | 175 | /** Optional. Message is a general file, information about the file */ |
176 | - public null|document $document = null; |
|
176 | + public null | document $document = null; |
|
177 | 177 | |
178 | 178 | /** |
179 | 179 | * Optional. Message is a photo, available sizes of the photo |
180 | 180 | * @var photoSize[] |
181 | 181 | */ |
182 | - public null|array $photo = null; |
|
182 | + public null | array $photo = null; |
|
183 | 183 | |
184 | 184 | /** Optional. Message is a sticker, information about the sticker */ |
185 | - public null|sticker $sticker = null; |
|
185 | + public null | sticker $sticker = null; |
|
186 | 186 | |
187 | 187 | /** Optional. Message is a video, information about the video */ |
188 | - public null|video $video = null; |
|
188 | + public null | video $video = null; |
|
189 | 189 | |
190 | 190 | /** Optional. Message is a video note, information about the video message */ |
191 | - public null|videoNote $video_note = null; |
|
191 | + public null | videoNote $video_note = null; |
|
192 | 192 | |
193 | 193 | /** Optional. Message is a voice message, information about the file */ |
194 | - public null|voice $voice = null; |
|
194 | + public null | voice $voice = null; |
|
195 | 195 | |
196 | 196 | /** Optional. Caption for the animation, audio, document, photo, video or voice */ |
197 | - public null|string $caption = null; |
|
197 | + public null | string $caption = null; |
|
198 | 198 | |
199 | 199 | /** |
200 | 200 | * Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear |
201 | 201 | * in the caption |
202 | 202 | * @var messageEntity[] |
203 | 203 | */ |
204 | - public null|array $caption_entities = null; |
|
204 | + public null | array $caption_entities = null; |
|
205 | 205 | |
206 | 206 | /** Optional. Message is a shared contact, information about the contact */ |
207 | - public null|contact $contact = null; |
|
207 | + public null | contact $contact = null; |
|
208 | 208 | |
209 | 209 | /** Optional. Message is a dice with random value */ |
210 | - public null|dice $dice = null; |
|
210 | + public null | dice $dice = null; |
|
211 | 211 | |
212 | 212 | /** Optional. Message is a game, information about the game. More about games » */ |
213 | - public null|game $game = null; |
|
213 | + public null | game $game = null; |
|
214 | 214 | |
215 | 215 | /** Optional. Message is a native poll, information about the poll */ |
216 | - public null|poll $poll = null; |
|
216 | + public null | poll $poll = null; |
|
217 | 217 | |
218 | 218 | /** |
219 | 219 | * Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, |
220 | 220 | * the location field will also be set |
221 | 221 | */ |
222 | - public null|venue $venue = null; |
|
222 | + public null | venue $venue = null; |
|
223 | 223 | |
224 | 224 | /** Optional. Message is a shared location, information about the location */ |
225 | - public null|location $location = null; |
|
225 | + public null | location $location = null; |
|
226 | 226 | |
227 | 227 | /** |
228 | 228 | * Optional. New members that were added to the group or supergroup and information about them (the bot itself |
229 | 229 | * may be one of these members) |
230 | 230 | * @var user[] |
231 | 231 | */ |
232 | - public null|array $new_chat_members = null; |
|
232 | + public null | array $new_chat_members = null; |
|
233 | 233 | |
234 | 234 | /** Optional. A member was removed from the group, information about them (this member may be the bot itself) */ |
235 | - public null|user $left_chat_member = null; |
|
235 | + public null | user $left_chat_member = null; |
|
236 | 236 | |
237 | 237 | /** Optional. A chat title was changed to this value */ |
238 | - public null|string $new_chat_title = null; |
|
238 | + public null | string $new_chat_title = null; |
|
239 | 239 | |
240 | 240 | /** |
241 | 241 | * Optional. A chat photo was change to this value |
242 | 242 | * @var photoSize[] |
243 | 243 | */ |
244 | - public null|array $new_chat_photo = null; |
|
244 | + public null | array $new_chat_photo = null; |
|
245 | 245 | |
246 | 246 | /** Optional. Service message: the chat photo was deleted */ |
247 | - public null|bool $delete_chat_photo = null; |
|
247 | + public null | bool $delete_chat_photo = null; |
|
248 | 248 | |
249 | 249 | /** Optional. Service message: the group has been created */ |
250 | - public null|bool $group_chat_created = null; |
|
250 | + public null | bool $group_chat_created = null; |
|
251 | 251 | |
252 | 252 | /** |
253 | 253 | * Optional. Service message: the supergroup has been created. This field can't be received in a message coming |
254 | 254 | * through updates, because bot can't be a member of a supergroup when it is created. It can only be found in |
255 | 255 | * reply_to_message if someone replies to a very first message in a directly created supergroup. |
256 | 256 | */ |
257 | - public null|bool $supergroup_chat_created = null; |
|
257 | + public null | bool $supergroup_chat_created = null; |
|
258 | 258 | |
259 | 259 | /** |
260 | 260 | * Optional. Service message: the channel has been created. This field can't be received in a message coming |
261 | 261 | * through updates, because bot can't be a member of a channel when it is created. It can only be found in |
262 | 262 | * reply_to_message if someone replies to a very first message in a channel. |
263 | 263 | */ |
264 | - public null|bool $channel_chat_created = null; |
|
264 | + public null | bool $channel_chat_created = null; |
|
265 | 265 | |
266 | 266 | /** Optional. Service message: auto-delete timer settings changed in the chat */ |
267 | - public null|messageAutoDeleteTimerChanged $message_auto_delete_timer_changed = null; |
|
267 | + public null | messageAutoDeleteTimerChanged $message_auto_delete_timer_changed = null; |
|
268 | 268 | |
269 | 269 | /** |
270 | 270 | * Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | * But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for |
273 | 273 | * storing this identifier. |
274 | 274 | */ |
275 | - public null|int $migrate_to_chat_id = null; |
|
275 | + public null | int $migrate_to_chat_id = null; |
|
276 | 276 | |
277 | 277 | /** |
278 | 278 | * Optional. The supergroup has been migrated from a group with the specified identifier. This number may have |
@@ -280,70 +280,70 @@ discard block |
||
280 | 280 | * interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float |
281 | 281 | * type are safe for storing this identifier. |
282 | 282 | */ |
283 | - public null|int $migrate_from_chat_id = null; |
|
283 | + public null | int $migrate_from_chat_id = null; |
|
284 | 284 | |
285 | 285 | /** |
286 | 286 | * Optional. Specified message was pinned. Note that the Message object in this field will not contain further |
287 | 287 | * reply_to_message fields even if it is itself a reply. |
288 | 288 | */ |
289 | - public null|message $pinned_message = null; |
|
289 | + public null | message $pinned_message = null; |
|
290 | 290 | |
291 | 291 | /** Optional. Message is an invoice for a payment, information about the invoice. More about payments » */ |
292 | - public null|invoice $invoice = null; |
|
292 | + public null | invoice $invoice = null; |
|
293 | 293 | |
294 | 294 | /** |
295 | 295 | * Optional. Message is a service message about a successful payment, information about the payment. More about |
296 | 296 | * payments » |
297 | 297 | */ |
298 | - public null|successfulPayment $successful_payment = null; |
|
298 | + public null | successfulPayment $successful_payment = null; |
|
299 | 299 | |
300 | 300 | /** Optional. The domain name of the website on which the user has logged in. More about Telegram Login » */ |
301 | - public null|string $connected_website = null; |
|
301 | + public null | string $connected_website = null; |
|
302 | 302 | |
303 | 303 | /** Optional. Telegram Passport data */ |
304 | - public null|passportData $passport_data = null; |
|
304 | + public null | passportData $passport_data = null; |
|
305 | 305 | |
306 | 306 | /** |
307 | 307 | * Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live |
308 | 308 | * Location. |
309 | 309 | */ |
310 | - public null|proximityAlertTriggered $proximity_alert_triggered = null; |
|
310 | + public null | proximityAlertTriggered $proximity_alert_triggered = null; |
|
311 | 311 | |
312 | 312 | /** Optional. Service message: forum topic created */ |
313 | - public null|forumTopicCreated $forum_topic_created = null; |
|
313 | + public null | forumTopicCreated $forum_topic_created = null; |
|
314 | 314 | |
315 | 315 | /** Optional. Service message: forum topic closed */ |
316 | - public null|forumTopicClosed $forum_topic_closed = null; |
|
316 | + public null | forumTopicClosed $forum_topic_closed = null; |
|
317 | 317 | |
318 | 318 | /** Optional. Service message: forum topic reopened */ |
319 | - public null|forumTopicReopened $forum_topic_reopened = null; |
|
319 | + public null | forumTopicReopened $forum_topic_reopened = null; |
|
320 | 320 | |
321 | 321 | /** Optional. Service message: video chat scheduled */ |
322 | - public null|videoChatScheduled $video_chat_scheduled = null; |
|
322 | + public null | videoChatScheduled $video_chat_scheduled = null; |
|
323 | 323 | |
324 | 324 | /** Optional. Service message: video chat started */ |
325 | - public null|videoChatStarted $video_chat_started = null; |
|
325 | + public null | videoChatStarted $video_chat_started = null; |
|
326 | 326 | |
327 | 327 | /** Optional. Service message: video chat ended */ |
328 | - public null|videoChatEnded $video_chat_ended = null; |
|
328 | + public null | videoChatEnded $video_chat_ended = null; |
|
329 | 329 | |
330 | 330 | /** Optional. Service message: new participants invited to a video chat */ |
331 | - public null|videoChatParticipantsInvited $video_chat_participants_invited = null; |
|
331 | + public null | videoChatParticipantsInvited $video_chat_participants_invited = null; |
|
332 | 332 | |
333 | 333 | /** Optional. Service message: data sent by a Web App */ |
334 | - public null|webAppData $web_app_data = null; |
|
334 | + public null | webAppData $web_app_data = null; |
|
335 | 335 | |
336 | 336 | /** Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. */ |
337 | - public null|inlineKeyboardMarkup $reply_markup = null; |
|
337 | + public null | inlineKeyboardMarkup $reply_markup = null; |
|
338 | 338 | |
339 | 339 | |
340 | - public function __construct(stdClass|null $object = null) { |
|
340 | + public function __construct(stdClass | null $object = null) { |
|
341 | 341 | if ($object != null) { |
342 | 342 | parent::__construct($object, self::subs); |
343 | 343 | } |
344 | 344 | } |
345 | 345 | |
346 | - public function delete (): responseError|bool { |
|
347 | - return telegram::deleteMessage($this->chat->id,$this->id); |
|
346 | + public function delete(): responseError | bool { |
|
347 | + return telegram::deleteMessage($this->chat->id, $this->id); |
|
348 | 348 | } |
349 | 349 | } |
@@ -26,23 +26,23 @@ |
||
26 | 26 | public int $date; |
27 | 27 | |
28 | 28 | /** Optional. Bio of the user. */ |
29 | - public null|string $bio = null; |
|
29 | + public null | string $bio = null; |
|
30 | 30 | |
31 | 31 | /** Optional. Chat invite link that was used by the user to send the join request */ |
32 | - public null|chatInviteLink $invite_link = null; |
|
32 | + public null | chatInviteLink $invite_link = null; |
|
33 | 33 | |
34 | 34 | |
35 | - public function __construct(stdClass|null $object = null) { |
|
35 | + public function __construct(stdClass | null $object = null) { |
|
36 | 36 | if ($object != null) { |
37 | 37 | parent::__construct($object, self::subs); |
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
41 | - public function accept(): responseError|bool { |
|
42 | - return telegram::approveChatJoinRequest($this->chat->id,$this->from->id); |
|
41 | + public function accept(): responseError | bool { |
|
42 | + return telegram::approveChatJoinRequest($this->chat->id, $this->from->id); |
|
43 | 43 | } |
44 | 44 | |
45 | - public function deny(): responseError|bool { |
|
46 | - return telegram::declineChatJoinRequest($this->chat->id,$this->from->id); |
|
45 | + public function deny(): responseError | bool { |
|
46 | + return telegram::declineChatJoinRequest($this->chat->id, $this->from->id); |
|
47 | 47 | } |
48 | 48 | } |
@@ -18,31 +18,31 @@ |
||
18 | 18 | public float $latitude; |
19 | 19 | |
20 | 20 | /** Optional. The radius of uncertainty for the location, measured in meters; 0-1500 */ |
21 | - public null|float $horizontal_accuracy = null; |
|
21 | + public null | float $horizontal_accuracy = null; |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For |
25 | 25 | * active live locations only. |
26 | 26 | */ |
27 | - public null|int $live_period = null; |
|
27 | + public null | int $live_period = null; |
|
28 | 28 | |
29 | 29 | /** Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only. */ |
30 | - public null|int $heading = null; |
|
30 | + public null | int $heading = null; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent |
34 | 34 | * live locations only. |
35 | 35 | */ |
36 | - public null|int $proximity_alert_radius = null; |
|
36 | + public null | int $proximity_alert_radius = null; |
|
37 | 37 | |
38 | 38 | |
39 | - public function __construct(stdClass|null $object = null) { |
|
39 | + public function __construct(stdClass | null $object = null) { |
|
40 | 40 | if ($object != null) { |
41 | 41 | parent::__construct($object, self::subs); |
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
45 | - public function mapLink (): string { |
|
45 | + public function mapLink(): string { |
|
46 | 46 | return "https://www.google.com/maps/search/$this->latitude,$this->longitude"; |
47 | 47 | } |
48 | 48 | } |
@@ -31,23 +31,23 @@ discard block |
||
31 | 31 | public int $duration; |
32 | 32 | |
33 | 33 | /** Optional. Video thumbnail */ |
34 | - public null|photoSize $thumb = null; |
|
34 | + public null | photoSize $thumb = null; |
|
35 | 35 | |
36 | 36 | /** Optional. Original filename as defined by sender */ |
37 | - public null|string $file_name = null; |
|
37 | + public null | string $file_name = null; |
|
38 | 38 | |
39 | 39 | /** Optional. MIME type of the file as defined by sender */ |
40 | - public null|string $mime_type = null; |
|
40 | + public null | string $mime_type = null; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have |
44 | 44 | * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit |
45 | 45 | * integer or double-precision float type are safe for storing this value. |
46 | 46 | */ |
47 | - public null|int $file_size = null; |
|
47 | + public null | int $file_size = null; |
|
48 | 48 | |
49 | 49 | |
50 | - public function __construct(stdClass|null $object = null) { |
|
50 | + public function __construct(stdClass | null $object = null) { |
|
51 | 51 | if ($object != null) { |
52 | 52 | parent::__construct($object, self::subs); |
53 | 53 | } |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | * |
69 | 69 | * @return bool|string string will be returned when destination doesn't set |
70 | 70 | */ |
71 | - public function download(string|null $destination = null): bool|string { |
|
72 | - return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp4',$this->file_id); |
|
71 | + public function download(string | null $destination = null): bool | string { |
|
72 | + return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.mp4', $this->file_id); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | public function link(): string { |
@@ -38,34 +38,34 @@ discard block |
||
38 | 38 | public int $height; |
39 | 39 | |
40 | 40 | /** True, if the sticker is animated */ |
41 | - public null|bool $is_animated = null; |
|
41 | + public null | bool $is_animated = null; |
|
42 | 42 | |
43 | 43 | /** True, if the sticker is a video sticker */ |
44 | - public null|bool $is_video = null; |
|
44 | + public null | bool $is_video = null; |
|
45 | 45 | |
46 | 46 | /** Optional. Sticker thumbnail in the .WEBP or .JPG format */ |
47 | - public null|photoSize $thumb = null; |
|
47 | + public null | photoSize $thumb = null; |
|
48 | 48 | |
49 | 49 | /** Optional. Emoji associated with the sticker */ |
50 | - public null|string $emoji = null; |
|
50 | + public null | string $emoji = null; |
|
51 | 51 | |
52 | 52 | /** Optional. Name of the sticker set to which the sticker belongs */ |
53 | - public null|string $set_name = null; |
|
53 | + public null | string $set_name = null; |
|
54 | 54 | |
55 | 55 | /** Optional. Premium animation for the sticker, if the sticker is premium */ |
56 | - public null|file $premium_animation = null; |
|
56 | + public null | file $premium_animation = null; |
|
57 | 57 | |
58 | 58 | /** Optional. For mask stickers, the position where the mask should be placed */ |
59 | - public null|maskPosition $mask_position = null; |
|
59 | + public null | maskPosition $mask_position = null; |
|
60 | 60 | |
61 | 61 | /** Optional. For custom emoji stickers, unique identifier of the custom emoji */ |
62 | - public null|string $custom_emoji_id = null; |
|
62 | + public null | string $custom_emoji_id = null; |
|
63 | 63 | |
64 | 64 | /** Optional. File size in bytes */ |
65 | - public null|int $file_size = null; |
|
65 | + public null | int $file_size = null; |
|
66 | 66 | |
67 | 67 | |
68 | - public function __construct(stdClass|null $object = null) { |
|
68 | + public function __construct(stdClass | null $object = null) { |
|
69 | 69 | if ($object != null) { |
70 | 70 | parent::__construct($object, self::subs); |
71 | 71 | } |
@@ -86,8 +86,8 @@ discard block |
||
86 | 86 | * |
87 | 87 | * @return bool|string string will be returned when destination doesn't set |
88 | 88 | */ |
89 | - public function download(string|null $destination = null): bool|string { |
|
90 | - return telegram::downloadFile($destination ?? 'unknown.png',$this->file_id); |
|
89 | + public function download(string | null $destination = null): bool | string { |
|
90 | + return telegram::downloadFile($destination ?? 'unknown.png', $this->file_id); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | public function link(): string { |
@@ -31,23 +31,23 @@ discard block |
||
31 | 31 | public int $duration; |
32 | 32 | |
33 | 33 | /** Optional. Animation thumbnail as defined by sender */ |
34 | - public null|photoSize $thumb = null; |
|
34 | + public null | photoSize $thumb = null; |
|
35 | 35 | |
36 | 36 | /** Optional. Original animation filename as defined by sender */ |
37 | - public null|string $file_name = null; |
|
37 | + public null | string $file_name = null; |
|
38 | 38 | |
39 | 39 | /** Optional. MIME type of the file as defined by sender */ |
40 | - public null|string $mime_type = null; |
|
40 | + public null | string $mime_type = null; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have |
44 | 44 | * difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit |
45 | 45 | * integer or double-precision float type are safe for storing this value. |
46 | 46 | */ |
47 | - public null|int $file_size = null; |
|
47 | + public null | int $file_size = null; |
|
48 | 48 | |
49 | 49 | |
50 | - public function __construct(stdClass|null $object = null) { |
|
50 | + public function __construct(stdClass | null $object = null) { |
|
51 | 51 | if ($object != null) { |
52 | 52 | parent::__construct($object, self::subs); |
53 | 53 | } |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | * |
69 | 69 | * @return bool|string string will be returned when destination doesn't set |
70 | 70 | */ |
71 | - public function download(string|null $destination = null): bool|string { |
|
72 | - return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.gif',$this->file_id); |
|
71 | + public function download(string | null $destination = null): bool | string { |
|
72 | + return telegram::downloadFile($destination ?? $this->file_name ?? 'unknown.gif', $this->file_id); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | public function link(): string { |