Passed
Push — main ( 4af278...3f64e8 )
by Miaad
01:24
created

message   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 283
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 95
dl 0
loc 283
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
1
<?php
2
3
namespace BPT\types;
4
5
use stdClass;
6
7
/**
8
 * This object represents a message.
9
 */
10
class message extends types {
0 ignored issues
show
Bug introduced by
The type BPT\types\types was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
	/** Keep all of properties which has sub properties */
12
	private const subs = [
13
		'from' => 'BPT\types\user',
14
		'sender_chat' => 'BPT\types\chat',
15
		'chat' => 'BPT\types\chat',
16
		'forward_from' => 'BPT\types\user',
17
		'forward_from_chat' => 'BPT\types\chat',
18
		'reply_to_message' => 'BPT\types\message',
19
		'via_bot' => 'BPT\types\user',
20
		'animation' => 'BPT\types\animation',
21
		'audio' => 'BPT\types\audio',
22
		'document' => 'BPT\types\document',
23
		'sticker' => 'BPT\types\sticker',
24
		'video' => 'BPT\types\video',
25
		'video_note' => 'BPT\types\videoNote',
26
		'voice' => 'BPT\types\voice',
27
		'contact' => 'BPT\types\contact',
28
		'dice' => 'BPT\types\dice',
29
		'game' => 'BPT\types\game',
30
		'poll' => 'BPT\types\poll',
31
		'venue' => 'BPT\types\venue',
32
		'location' => 'BPT\types\location',
33
		'left_chat_member' => 'BPT\types\user',
34
		'message_auto_delete_timer_changed' => 'BPT\types\messageAutoDeleteTimerChanged',
35
		'pinned_message' => 'BPT\types\message',
36
		'invoice' => 'BPT\types\invoice',
37
		'successful_payment' => 'BPT\types\successfulPayment',
38
		'passport_data' => 'BPT\types\passportData',
39
		'proximity_alert_triggered' => 'BPT\types\proximityAlertTriggered',
40
		'video_chat_scheduled' => 'BPT\types\videoChatScheduled',
41
		'video_chat_started' => 'BPT\types\videoChatStarted',
42
		'video_chat_ended' => 'BPT\types\videoChatEnded',
43
		'video_chat_participants_invited' => 'BPT\types\videoChatParticipantsInvited',
44
		'web_app_data' => 'BPT\types\webAppData',
45
		'reply_markup' => 'BPT\types\inlineKeyboardMarkup',
46
	];
47
48
	/** Unique message identifier inside this chat */
49
	public int $message_id;
50
51
	/**
52
	 * Optional. Sender of the message; empty for messages sent to channels. For backward compatibility, the field
53
	 * contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.
54
	 */
55
	public user $from;
56
57
	/**
58
	 * Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts,
59
	 * the supergroup itself for messages from anonymous group administrators, the linked channel for messages
60
	 * automatically forwarded to the discussion group.  For backward compatibility, the field from contains a fake
61
	 * sender user in non-channel chats, if the message was sent on behalf of a chat.
62
	 */
63
	public chat $sender_chat;
64
65
	/** Date the message was sent in Unix time */
66
	public int $date;
67
68
	/** Conversation the message belongs to */
69
	public chat $chat;
70
71
	/** Optional. For forwarded messages, sender of the original message */
72
	public user $forward_from;
73
74
	/**
75
	 * Optional. For messages forwarded from channels or from anonymous administrators, information about the
76
	 * original sender chat
77
	 */
78
	public chat $forward_from_chat;
79
80
	/** Optional. For messages forwarded from channels, identifier of the original message in the channel */
81
	public int $forward_from_message_id;
82
83
	/**
84
	 * Optional. For forwarded messages that were originally sent in channels or by an anonymous chat administrator,
85
	 * signature of the message sender if present
86
	 */
87
	public string $forward_signature;
88
89
	/**
90
	 * Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in
91
	 * forwarded messages
92
	 */
93
	public string $forward_sender_name;
94
95
	/** Optional. For forwarded messages, date the original message was sent in Unix time */
96
	public int $forward_date;
97
98
	/**
99
	 * Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion
100
	 * group
101
	 */
102
	public bool $is_automatic_forward;
103
104
	/**
105
	 * Optional. For replies, the original message. Note that the Message object in this field will not contain
106
	 * further reply_to_message fields even if it itself is a reply.
107
	 */
108
	public message $reply_to_message;
109
110
	/** Optional. Bot through which the message was sent */
111
	public user $via_bot;
112
113
	/** Optional. Date the message was last edited in Unix time */
114
	public int $edit_date;
115
116
	/** Optional. True, if the message can't be forwarded */
117
	public bool $has_protected_content;
118
119
	/** Optional. The unique identifier of a media message group this message belongs to */
120
	public string $media_group_id;
121
122
	/**
123
	 * Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group
124
	 * administrator
125
	 */
126
	public string $author_signature;
127
128
	/** Optional. For text messages, the actual UTF-8 text of the message, 0-4096 characters */
129
	public string $text;
130
131
	/** Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text */
132
	public array $entities;
133
134
	/**
135
	 * Optional. Message is an animation, information about the animation. For backward compatibility, when this
136
	 * field is set, the document field will also be set
137
	 */
138
	public animation $animation;
139
140
	/** Optional. Message is an audio file, information about the file */
141
	public audio $audio;
142
143
	/** Optional. Message is a general file, information about the file */
144
	public document $document;
145
146
	/** Optional. Message is a photo, available sizes of the photo */
147
	public array $photo;
148
149
	/** Optional. Message is a sticker, information about the sticker */
150
	public sticker $sticker;
151
152
	/** Optional. Message is a video, information about the video */
153
	public video $video;
154
155
	/** Optional. Message is a video note, information about the video message */
156
	public videoNote $video_note;
157
158
	/** Optional. Message is a voice message, information about the file */
159
	public voice $voice;
160
161
	/** Optional. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters */
162
	public string $caption;
163
164
	/**
165
	 * Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear
166
	 * in the caption
167
	 */
168
	public array $caption_entities;
169
170
	/** Optional. Message is a shared contact, information about the contact */
171
	public contact $contact;
172
173
	/** Optional. Message is a dice with random value */
174
	public dice $dice;
175
176
	/** Optional. Message is a game, information about the game. More about games » */
177
	public game $game;
178
179
	/** Optional. Message is a native poll, information about the poll */
180
	public poll $poll;
181
182
	/**
183
	 * Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set,
184
	 * the location field will also be set
185
	 */
186
	public venue $venue;
187
188
	/** Optional. Message is a shared location, information about the location */
189
	public location $location;
190
191
	/**
192
	 * Optional. New members that were added to the group or supergroup and information about them (the bot itself
193
	 * may be one of these members)
194
	 */
195
	public array $new_chat_members;
196
197
	/** Optional. A member was removed from the group, information about them (this member may be the bot itself) */
198
	public user $left_chat_member;
199
200
	/** Optional. A chat title was changed to this value */
201
	public string $new_chat_title;
202
203
	/** Optional. A chat photo was change to this value */
204
	public array $new_chat_photo;
205
206
	/** Optional. Service message: the chat photo was deleted */
207
	public bool $delete_chat_photo;
208
209
	/** Optional. Service message: the group has been created */
210
	public bool $group_chat_created;
211
212
	/**
213
	 * Optional. Service message: the supergroup has been created. This field can't be received in a message coming
214
	 * through updates, because bot can't be a member of a supergroup when it is created. It can only be found in
215
	 * reply_to_message if someone replies to a very first message in a directly created supergroup.
216
	 */
217
	public bool $supergroup_chat_created;
218
219
	/**
220
	 * Optional. Service message: the channel has been created. This field can't be received in a message coming
221
	 * through updates, because bot can't be a member of a channel when it is created. It can only be found in
222
	 * reply_to_message if someone replies to a very first message in a channel.
223
	 */
224
	public bool $channel_chat_created;
225
226
	/** Optional. Service message: auto-delete timer settings changed in the chat */
227
	public messageAutoDeleteTimerChanged $message_auto_delete_timer_changed;
228
229
	/**
230
	 * Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more
231
	 * than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
232
	 * But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for
233
	 * storing this identifier.
234
	 */
235
	public int $migrate_to_chat_id;
236
237
	/**
238
	 * Optional. The supergroup has been migrated from a group with the specified identifier. This number may have
239
	 * more than 32 significant bits and some programming languages may have difficulty/silent defects in
240
	 * interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float
241
	 * type are safe for storing this identifier.
242
	 */
243
	public int $migrate_from_chat_id;
244
245
	/**
246
	 * Optional. Specified message was pinned. Note that the Message object in this field will not contain further
247
	 * reply_to_message fields even if it is itself a reply.
248
	 */
249
	public message $pinned_message;
250
251
	/** Optional. Message is an invoice for a payment, information about the invoice. More about payments » */
252
	public invoice $invoice;
253
254
	/**
255
	 * Optional. Message is a service message about a successful payment, information about the payment. More about
256
	 * payments »
257
	 */
258
	public successfulPayment $successful_payment;
259
260
	/** Optional. The domain name of the website on which the user has logged in. More about Telegram Login » */
261
	public string $connected_website;
262
263
	/** Optional. Telegram Passport data */
264
	public passportData $passport_data;
265
266
	/**
267
	 * Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live
268
	 * Location.
269
	 */
270
	public proximityAlertTriggered $proximity_alert_triggered;
271
272
	/** Optional. Service message: video chat scheduled */
273
	public videoChatScheduled $video_chat_scheduled;
274
275
	/** Optional. Service message: video chat started */
276
	public videoChatStarted $video_chat_started;
277
278
	/** Optional. Service message: video chat ended */
279
	public videoChatEnded $video_chat_ended;
280
281
	/** Optional. Service message: new participants invited to a video chat */
282
	public videoChatParticipantsInvited $video_chat_participants_invited;
283
284
	/** Optional. Service message: data sent by a Web App */
285
	public webAppData $web_app_data;
286
287
	/** Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. */
288
	public inlineKeyboardMarkup $reply_markup;
289
290
291
	public function __construct(stdClass $update) {
292
		parent::__construct($update, self::subs);
293
	}
294
}
295