- Remove nullsafe operator from location property
- Fix user serialization in TransactionPartnerUser - Remove null check for stickers in StickerSet - Fix nullable operator usage in ShippingQuery toArray method - Remove null-safe operator for traveler and watcher - Fix null-safe operator in PreCheckoutQuery.php - Fix null safe operator usage in PollAnswer.php - Refactor null checks in PassportData methods - Remove nullsafe operator from chat property - Refactor web_app handling in MenuButtonWebApp class - Fix conditional assignment in InputMediaVideo - Fix null coalescing and array mapping in InputMediaAudio - Fix redundant null coalescing in caption_entities mapping - Fix parsing of caption_entities field in InlineQueryResultPhoto - Fix potential unnecessary null coalescing in caption_entities - Fix redundant null coalescence check in reply_markup assignment - Fix redundant null coalescing in array_map calls - Refactor: remove unnecessary null coalescing operator - Fix conditional check for caption_entities assignment - Fix handling of input_message_content array conversion - Fix potential null pointer issue in InlineQuery class - Remove redundant null check in toArray method - Fix redundant null coalesce operator in photo mapping - Remove null safe operator for origin - Fix redundant null coalescing in array_map calls. - Fix optional chaining error in ChosenInlineResult.php - Remove null-safe operator in toArray() method - Fix null safe operator usage in ChatMemberRestricted - Fix null-safe operator usage in ChatMemberOwner.php - Fix null safe operator usage in ChatMemberMember.php - Fix nullable operator usage in ChatMemberLeft class - Fix null-safe operator in ChatMemberBanned serialization. - Fix user attribute null coalescing in ChatMemberAdministrator - Fix null-safe operator usage in ChatLocation conversion - Remove null safe operator in toArray() method - Fix nullable operator usage in ChatInviteLink serialization - Fix potential null pointer issue in ChatBoostSourcePremium. - Remove null safe operator in ChatBoostRemoved toArray method - Fix 'from' property serialization in CallbackQuery - Fix nullable operator usage on chat property - Remove redundant type check for associative array - Remove deprecated BotOld.php file
This commit is contained in:
parent
7b16b2bbc6
commit
32d8e233b8
42 changed files with 59 additions and 2853 deletions
|
@ -76,7 +76,7 @@
|
|||
{
|
||||
return [
|
||||
'result_id' => $this->result_id,
|
||||
'from' => $this->from?->toArray(),
|
||||
'from' => $this->from->toArray(),
|
||||
'location' => $this->location?->toArray(),
|
||||
'inline_message_id' => $this->inline_message_id,
|
||||
'query' => $this->query,
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'from' => $this->from?->toArray(),
|
||||
'from' => $this->from->toArray(),
|
||||
'query' => $this->query,
|
||||
'offset' => $this->offset,
|
||||
'chat_type' => $this->chat_type?->value,
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
'type' => $this->type->value,
|
||||
'id' => $this->id,
|
||||
'title' => $this->title,
|
||||
'input_message_content' => $this->input_message_content?->toArray(),
|
||||
'input_message_content' => $this->input_message_content->toArray(),
|
||||
'reply_markup' => $this->reply_markup?->toArray(),
|
||||
'url' => $this->url,
|
||||
'hide_url' => $this->hide_url,
|
||||
|
@ -273,7 +273,7 @@
|
|||
$object->type = InlineQueryResultType::ARTICLE;
|
||||
$object->id = $data['id'] ?? null;
|
||||
$object->title = $data['title'] ?? null;
|
||||
$object->input_message_content = isset($data['input_message_content']) ? InputMessageContent::fromArray($data['input_message_content'] ?? null) : null;
|
||||
$object->input_message_content = isset($data['input_message_content']) ? InputMessageContent::fromArray($data['input_message_content']) : null;
|
||||
$object->reply_markup = isset($data['reply_markup']) ? InlineKeyboardMarkup::fromArray($data['reply_markup']) : null;
|
||||
$object->url = $data['url'] ?? null;
|
||||
$object->hide_url = $data['hide_url'] ?? null;
|
||||
|
|
|
@ -326,7 +326,7 @@
|
|||
$object->title = $data['title'] ?? null;
|
||||
$object->caption = $data['caption'] ?? null;
|
||||
$object->parse_mode = $data['parse_mode'] ?? null;
|
||||
$object->caption_entities = isset($data['caption_entities']) ? array_map(fn(array $items) => MessageEntity::fromArray($items), $data['caption_entities'] ?? []) : null;
|
||||
$object->caption_entities = isset($data['caption_entities']) ? array_map(fn(array $items) => MessageEntity::fromArray($items), $data['caption_entities']) : null;
|
||||
$object->performer = $data['performer'] ?? null;
|
||||
$object->audio_duration = $data['audio_duration'] ?? null;
|
||||
$object->reply_markup = ($data['reply_markup']) ? InlineKeyboardMarkup::fromArray($data['reply_markup']) : null;
|
||||
|
|
|
@ -393,12 +393,12 @@
|
|||
$object->title = $data['title'] ?? null;
|
||||
$object->caption = $data['caption'] ?? null;
|
||||
$object->parse_mode = $data['parse_mode'] ?? null;
|
||||
$object->caption_entities = isset($data['caption_entities']) ? array_map(fn(array $items) => MessageEntity::fromArray($items), $data['caption_entities'] ?? []) : null;
|
||||
$object->caption_entities = isset($data['caption_entities']) ? array_map(fn(array $items) => MessageEntity::fromArray($items), $data['caption_entities']) : null;
|
||||
$object->document_url = $data['document_url'] ?? null;
|
||||
$object->mime_type = $data['mime_type'] ?? null;
|
||||
$object->description = $data['description'] ?? null;
|
||||
$object->reply_markup = isset($data['reply_markup']) ? InlineKeyboardMarkup::fromArray($data['reply_markup']) : null;
|
||||
$object->input_message_content = isset($data['input_message_content']) ? InputVenueMessageContent::fromArray($data['input_message_content'] ?? []) : null;
|
||||
$object->input_message_content = isset($data['input_message_content']) ? InputVenueMessageContent::fromArray($data['input_message_content']) : null;
|
||||
$object->thumbnail_url = $data['thumbnail_url'] ?? null;
|
||||
$object->thumbnail_width = $data['thumbnail_width'] ?? null;
|
||||
$object->thumbnail_height = $data['thumbnail_height'] ?? null;
|
||||
|
|
|
@ -408,8 +408,8 @@
|
|||
$object->title = $data['title'] ?? null;
|
||||
$object->caption = $data['caption'] ?? null;
|
||||
$object->parse_mode = $data['parse_mode'] ?? null;
|
||||
$object->caption_entities = isset($data['caption_entities']) ? array_map(fn(array $items) => MessageEntity::fromArray($items), $data['caption_entities'] ?? []) : null;
|
||||
$object->reply_markup = isset($data['reply_markup']) ? array_map(fn(array $items) => InlineKeyboardMarkup::fromArray($items), $data['reply_markup'] ?? []) : null;
|
||||
$object->caption_entities = isset($data['caption_entities']) ? array_map(fn(array $items) => MessageEntity::fromArray($items), $data['caption_entities']) : null;
|
||||
$object->reply_markup = isset($data['reply_markup']) ? array_map(fn(array $items) => InlineKeyboardMarkup::fromArray($items), $data['reply_markup']) : null;
|
||||
$object->input_message_content = isset($data['input_message_content']) ? InputMessageContent::fromArray($data['input_message_content']) : null;
|
||||
|
||||
return $object;
|
||||
|
|
|
@ -356,7 +356,7 @@
|
|||
$object->live_period = $data['live_period'] ?? null;
|
||||
$object->heading = $data['heading'] ?? null;
|
||||
$object->proximity_alert_radius = $data['proximity_alert_radius'] ?? null;
|
||||
$object->reply_markup = isset($data['reply_markup']) ? InlineKeyboardMarkup::fromArray($data['reply_markup'] ?? []) : null;
|
||||
$object->reply_markup = isset($data['reply_markup']) ? InlineKeyboardMarkup::fromArray($data['reply_markup']) : null;
|
||||
$object->input_message_content = isset($data['input_message_content']) ? InputMessageContent::fromArray($data['input_message_content']) : null;
|
||||
$object->thumbnail_url = $data['thumbnail_url'] ?? null;
|
||||
$object->thumbnail_width = $data['thumbnail_width'] ?? null;
|
||||
|
|
|
@ -340,7 +340,7 @@
|
|||
$object->title = $data['title'] ?? null;
|
||||
$object->caption = $data['caption'] ?? null;
|
||||
$object->parse_mode = $data['parse_mode'] ?? null;
|
||||
$object->caption_entities = isset($data['caption_entities']) ? array_map(fn(array $items) => MessageEntity::fromArray($items), $data['caption_entities'] ?? []) : null;
|
||||
$object->caption_entities = isset($data['caption_entities']) ? array_map(fn(array $items) => MessageEntity::fromArray($items), $data['caption_entities']) : null;
|
||||
$object->reply_markup = ($data['reply_markup'] ?? null) ? InlineKeyboardMarkup::fromArray($data['reply_markup']) : null;
|
||||
$object->input_message_content = ($data['input_message_content'] ?? null) ? InputVenueMessageContent::fromArray($data['input_message_content']) : null;
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@
|
|||
$object->description = $data['description'] ?? null;
|
||||
$object->caption = $data['caption'] ?? null;
|
||||
$object->parse_mode = $data['parse_mode'] ?? null;
|
||||
$object->caption_entities = isset($data['caption_entities']) ? array_map(fn(array $items) => MessageEntity::fromArray($items), $data['caption_entities'] ?? []) : null;
|
||||
$object->caption_entities = isset($data['caption_entities']) ? array_map(fn(array $items) => MessageEntity::fromArray($items), $data['caption_entities']) : null;
|
||||
$object->reply_markup = ($data['reply_markup'] !== null) ? InlineKeyboardMarkup::fromArray($data['reply_markup']) : null;
|
||||
$object->input_message_content = $data['input_message_content'] ?? null;
|
||||
|
||||
|
|
|
@ -371,7 +371,7 @@
|
|||
$object->title = $data['title'] ?? null;
|
||||
$object->caption = $data['caption'] ?? null;
|
||||
$object->parse_mode = $data['parse_mode'] ?? null;
|
||||
$object->caption_entities = isset($data['caption_entities']) ? array_map(fn(array $items) => MessageEntity::fromArray($items), $data['caption_entities'] ?? []) : null;
|
||||
$object->caption_entities = isset($data['caption_entities']) ? array_map(fn(array $items) => MessageEntity::fromArray($items), $data['caption_entities']) : null;
|
||||
$object->video_width = $data['video_width'] ?? null;
|
||||
$object->video_height = $data['video_height'] ?? null;
|
||||
$object->video_duration = $data['video_duration'] ?? null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue