From 69c025af0569d80884d5e01000d3634ba3deb4cf Mon Sep 17 00:00:00 2001 From: Netkas Date: Thu, 16 Feb 2023 15:27:57 -0500 Subject: [PATCH] Changed return types --- src/TgBotLib/Objects/Telegram/Animation.php | 4 ++-- src/TgBotLib/Objects/Telegram/Audio.php | 4 ++-- src/TgBotLib/Objects/Telegram/BotCommand.php | 4 ++-- .../Objects/Telegram/BotCommandScope.php | 4 ++-- .../BotCommandScopeAllChatAdministrators.php | 4 ++-- .../BotCommandScopeAllGroupChats.php | 4 ++-- .../BotCommandScopeAllPrivateChats.php | 4 ++-- .../BotCommandScope/BotCommandScopeChat.php | 4 ++-- .../BotCommandScopeChatAdministrators.php | 4 ++-- .../BotCommandScopeChatMember.php | 4 ++-- .../BotCommandScope/BotCommandScopeDefault.php | 4 ++-- src/TgBotLib/Objects/Telegram/CallbackGame.php | 4 ++-- src/TgBotLib/Objects/Telegram/CallbackQuery.php | 4 ++-- src/TgBotLib/Objects/Telegram/Chat.php | 4 ++-- .../Objects/Telegram/ChatAdministratorRights.php | 4 ++-- src/TgBotLib/Objects/Telegram/ChatInviteLink.php | 4 ++-- .../Objects/Telegram/ChatJoinRequest.php | 4 ++-- src/TgBotLib/Objects/Telegram/ChatLocation.php | 4 ++-- src/TgBotLib/Objects/Telegram/ChatMember.php | 4 ++-- .../ChatMember/ChatMemberAdministrator.php | 4 ++-- .../Telegram/ChatMember/ChatMemberBanned.php | 4 ++-- .../Telegram/ChatMember/ChatMemberLeft.php | 4 ++-- .../Telegram/ChatMember/ChatMemberMember.php | 4 ++-- .../Telegram/ChatMember/ChatMemberOwner.php | 4 ++-- .../Telegram/ChatMember/ChatMemberRestricted.php | 4 ++-- .../Objects/Telegram/ChatMemberUpdated.php | 4 ++-- .../Objects/Telegram/ChatPermissions.php | 4 ++-- src/TgBotLib/Objects/Telegram/ChatShared.php | 4 ++-- .../Objects/Telegram/ChosenInlineResult.php | 4 ++-- src/TgBotLib/Objects/Telegram/Contact.php | 4 ++-- src/TgBotLib/Objects/Telegram/Dice.php | 4 ++-- src/TgBotLib/Objects/Telegram/Document.php | 4 ++-- .../Objects/Telegram/EncryptedCredentials.php | 4 ++-- .../Telegram/EncryptedPassportElement.php | 4 ++-- src/TgBotLib/Objects/Telegram/File.php | 4 ++-- src/TgBotLib/Objects/Telegram/ForceReply.php | 4 ++-- src/TgBotLib/Objects/Telegram/ForumTopic.php | 4 ++-- .../Objects/Telegram/ForumTopicClosed.php | 4 ++-- .../Objects/Telegram/ForumTopicCreated.php | 4 ++-- .../Objects/Telegram/ForumTopicEdited.php | 4 ++-- .../Objects/Telegram/ForumTopicReopened.php | 4 ++-- src/TgBotLib/Objects/Telegram/Game.php | 4 ++-- .../Objects/Telegram/GeneralForumTopicHidden.php | 4 ++-- .../Telegram/GeneralForumTopicUnhidden.php | 4 ++-- .../Objects/Telegram/InlineKeyboardButton.php | 4 ++-- .../Objects/Telegram/InlineKeyboardMarkup.php | 4 ++-- src/TgBotLib/Objects/Telegram/InlineQuery.php | 4 ++-- src/TgBotLib/Objects/Telegram/InputMedia.php | 4 ++-- .../Telegram/InputMedia/InputMediaAnimation.php | 4 ++-- .../Telegram/InputMedia/InputMediaAudio.php | 4 ++-- .../Telegram/InputMedia/InputMediaDocument.php | 4 ++-- .../Telegram/InputMedia/InputMediaPhoto.php | 4 ++-- .../Telegram/InputMedia/InputMediaVideo.php | 4 ++-- src/TgBotLib/Objects/Telegram/Invoice.php | 4 ++-- src/TgBotLib/Objects/Telegram/KeyboardButton.php | 4 ++-- .../Objects/Telegram/KeyboardButtonPollType.php | 4 ++-- .../Telegram/KeyboardButtonRequestChat.php | 4 ++-- .../Telegram/KeyboardButtonRequestUser.php | 4 ++-- src/TgBotLib/Objects/Telegram/LabeledPrice.php | 4 ++-- src/TgBotLib/Objects/Telegram/Location.php | 4 ++-- src/TgBotLib/Objects/Telegram/LoginUrl.php | 4 ++-- src/TgBotLib/Objects/Telegram/MaskPosition.php | 4 ++-- src/TgBotLib/Objects/Telegram/MenuButton.php | 4 ++-- .../Telegram/MenuButton/MenuButtonCommands.php | 4 ++-- .../Telegram/MenuButton/MenuButtonDefault.php | 4 ++-- .../Telegram/MenuButton/MenuButtonWebApp.php | 4 ++-- .../Telegram/MessageAutoDeleteTimerChanged.php | 4 ++-- src/TgBotLib/Objects/Telegram/MessageEntity.php | 4 ++-- src/TgBotLib/Objects/Telegram/OrderInfo.php | 4 ++-- src/TgBotLib/Objects/Telegram/PassportData.php | 4 ++-- src/TgBotLib/Objects/Telegram/PassportFile.php | 4 ++-- src/TgBotLib/Objects/Telegram/PhotoSize.php | 4 ++-- src/TgBotLib/Objects/Telegram/Poll.php | 4 ++-- src/TgBotLib/Objects/Telegram/PollAnswer.php | 4 ++-- src/TgBotLib/Objects/Telegram/PollOption.php | 4 ++-- .../Objects/Telegram/PreCheckoutQuery.php | 4 ++-- .../Objects/Telegram/ProximityAlertTriggered.php | 4 ++-- .../Objects/Telegram/ReplyKeyboardMarkup.php | 4 ++-- .../Objects/Telegram/ReplyKeyboardRemove.php | 4 ++-- .../Objects/Telegram/ResponseParameters.php | 4 ++-- .../Objects/Telegram/ShippingAddress.php | 4 ++-- src/TgBotLib/Objects/Telegram/ShippingOption.php | 4 ++-- src/TgBotLib/Objects/Telegram/ShippingQuery.php | 4 ++-- src/TgBotLib/Objects/Telegram/Sticker.php | 4 ++-- .../Objects/Telegram/SuccessfulPayment.php | 4 ++-- src/TgBotLib/Objects/Telegram/Update.php | 4 ++-- .../Objects/Telegram/UserProfilePhotos.php | 16 ++++++++++------ src/TgBotLib/Objects/Telegram/UserShared.php | 4 ++-- src/TgBotLib/Objects/Telegram/Venue.php | 4 ++-- src/TgBotLib/Objects/Telegram/Video.php | 4 ++-- src/TgBotLib/Objects/Telegram/VideoChatEnded.php | 4 ++-- .../Telegram/VideoChatParticipantsInvited.php | 4 ++-- .../Objects/Telegram/VideoChatScheduled.php | 4 ++-- .../Objects/Telegram/VideoChatStarted.php | 4 ++-- src/TgBotLib/Objects/Telegram/VideoNote.php | 4 ++-- src/TgBotLib/Objects/Telegram/Voice.php | 4 ++-- src/TgBotLib/Objects/Telegram/WebAppData.php | 4 ++-- src/TgBotLib/Objects/Telegram/WebAppInfo.php | 4 ++-- .../Objects/Telegram/WriteAccessAllowed.php | 4 ++-- 99 files changed, 206 insertions(+), 202 deletions(-) diff --git a/src/TgBotLib/Objects/Telegram/Animation.php b/src/TgBotLib/Objects/Telegram/Animation.php index 70fba4e..693f5fb 100644 --- a/src/TgBotLib/Objects/Telegram/Animation.php +++ b/src/TgBotLib/Objects/Telegram/Animation.php @@ -170,9 +170,9 @@ * Constructs the object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return Animation */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/Audio.php b/src/TgBotLib/Objects/Telegram/Audio.php index c47514a..3bd02ca 100644 --- a/src/TgBotLib/Objects/Telegram/Audio.php +++ b/src/TgBotLib/Objects/Telegram/Audio.php @@ -165,9 +165,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return Audio */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/BotCommand.php b/src/TgBotLib/Objects/Telegram/BotCommand.php index 57141f6..03a6ecf 100644 --- a/src/TgBotLib/Objects/Telegram/BotCommand.php +++ b/src/TgBotLib/Objects/Telegram/BotCommand.php @@ -55,9 +55,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return BotCommand */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/BotCommandScope.php b/src/TgBotLib/Objects/Telegram/BotCommandScope.php index ba785d0..62ef6b0 100644 --- a/src/TgBotLib/Objects/Telegram/BotCommandScope.php +++ b/src/TgBotLib/Objects/Telegram/BotCommandScope.php @@ -75,9 +75,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return BotCommandScope */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { if(isset($data['type'])) { diff --git a/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeAllChatAdministrators.php b/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeAllChatAdministrators.php index f0618c2..2c75014 100644 --- a/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeAllChatAdministrators.php +++ b/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeAllChatAdministrators.php @@ -57,9 +57,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return BotCommandScopeAllChatAdministrators */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeAllGroupChats.php b/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeAllGroupChats.php index 943aced..9dbe5cb 100644 --- a/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeAllGroupChats.php +++ b/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeAllGroupChats.php @@ -41,9 +41,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return BotCommandScopeAllGroupChats */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeAllPrivateChats.php b/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeAllPrivateChats.php index c28c388..01738f4 100644 --- a/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeAllPrivateChats.php +++ b/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeAllPrivateChats.php @@ -41,9 +41,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return BotCommandScopeAllPrivateChats */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeChat.php b/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeChat.php index 48e8a22..109d31b 100644 --- a/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeChat.php +++ b/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeChat.php @@ -57,9 +57,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return BotCommandScopeChat */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeChatAdministrators.php b/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeChatAdministrators.php index df7cee8..4bab7c2 100644 --- a/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeChatAdministrators.php +++ b/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeChatAdministrators.php @@ -41,9 +41,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return BotCommandScopeChatAdministrators */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeChatMember.php b/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeChatMember.php index e52327b..0f17768 100644 --- a/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeChatMember.php +++ b/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeChatMember.php @@ -73,9 +73,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return BotCommandScopeChatMember */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeDefault.php b/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeDefault.php index cfd651f..cdb36dd 100644 --- a/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeDefault.php +++ b/src/TgBotLib/Objects/Telegram/BotCommandScope/BotCommandScopeDefault.php @@ -41,9 +41,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return BotCommandScopeDefault */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/CallbackGame.php b/src/TgBotLib/Objects/Telegram/CallbackGame.php index c52d4b7..3b4bd4f 100644 --- a/src/TgBotLib/Objects/Telegram/CallbackGame.php +++ b/src/TgBotLib/Objects/Telegram/CallbackGame.php @@ -22,9 +22,9 @@ * Constructs an object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return CallbackGame */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { return new self(); } diff --git a/src/TgBotLib/Objects/Telegram/CallbackQuery.php b/src/TgBotLib/Objects/Telegram/CallbackQuery.php index d57ca9c..9d8b139 100644 --- a/src/TgBotLib/Objects/Telegram/CallbackQuery.php +++ b/src/TgBotLib/Objects/Telegram/CallbackQuery.php @@ -140,9 +140,9 @@ * Constructs CallbackQuery object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return CallbackQuery */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/Chat.php b/src/TgBotLib/Objects/Telegram/Chat.php index 679e351..7bd9941 100644 --- a/src/TgBotLib/Objects/Telegram/Chat.php +++ b/src/TgBotLib/Objects/Telegram/Chat.php @@ -507,9 +507,9 @@ * Constructs a new Chat object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return Chat */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ChatAdministratorRights.php b/src/TgBotLib/Objects/Telegram/ChatAdministratorRights.php index 96871ca..e06f708 100644 --- a/src/TgBotLib/Objects/Telegram/ChatAdministratorRights.php +++ b/src/TgBotLib/Objects/Telegram/ChatAdministratorRights.php @@ -219,10 +219,10 @@ * Constructs the object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChatAdministratorRights * @noinspection DuplicatedCode */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ChatInviteLink.php b/src/TgBotLib/Objects/Telegram/ChatInviteLink.php index 0c2a43f..ae755ef 100644 --- a/src/TgBotLib/Objects/Telegram/ChatInviteLink.php +++ b/src/TgBotLib/Objects/Telegram/ChatInviteLink.php @@ -168,9 +168,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChatInviteLink */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ChatJoinRequest.php b/src/TgBotLib/Objects/Telegram/ChatJoinRequest.php index 9083051..088f5b7 100644 --- a/src/TgBotLib/Objects/Telegram/ChatJoinRequest.php +++ b/src/TgBotLib/Objects/Telegram/ChatJoinRequest.php @@ -123,9 +123,9 @@ * Constructs ChatJoinRequest object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChatJoinRequest */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ChatLocation.php b/src/TgBotLib/Objects/Telegram/ChatLocation.php index c72a48a..54f2ea5 100644 --- a/src/TgBotLib/Objects/Telegram/ChatLocation.php +++ b/src/TgBotLib/Objects/Telegram/ChatLocation.php @@ -55,9 +55,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChatLocation */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ChatMember.php b/src/TgBotLib/Objects/Telegram/ChatMember.php index 4cdfaf4..7114641 100644 --- a/src/TgBotLib/Objects/Telegram/ChatMember.php +++ b/src/TgBotLib/Objects/Telegram/ChatMember.php @@ -475,10 +475,10 @@ * Constructs an object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChatMember * @noinspection DuplicatedCode */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new static(); diff --git a/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberAdministrator.php b/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberAdministrator.php index fb1010c..8a8ef15 100644 --- a/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberAdministrator.php +++ b/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberAdministrator.php @@ -285,10 +285,10 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChatMemberAdministrator * @noinspection DuplicatedCode */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberBanned.php b/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberBanned.php index 7ed42d8..c30b8b8 100644 --- a/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberBanned.php +++ b/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberBanned.php @@ -74,9 +74,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChatMemberBanned */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberLeft.php b/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberLeft.php index 042c6c0..7416a06 100644 --- a/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberLeft.php +++ b/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberLeft.php @@ -58,9 +58,9 @@ * Constructs the object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChatMemberLeft */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberMember.php b/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberMember.php index b290a49..935b235 100644 --- a/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberMember.php +++ b/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberMember.php @@ -58,9 +58,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChatMemberMember */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberOwner.php b/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberOwner.php index 7b6ad01..35c0522 100644 --- a/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberOwner.php +++ b/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberOwner.php @@ -90,9 +90,9 @@ * Constructs ChatMemberOwner object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChatMemberOwner */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new ChatMemberOwner(); diff --git a/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberRestricted.php b/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberRestricted.php index 16709c5..d575f96 100644 --- a/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberRestricted.php +++ b/src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberRestricted.php @@ -314,10 +314,10 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChatMemberRestricted * @noinspection DuplicatedCode */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new static(); diff --git a/src/TgBotLib/Objects/Telegram/ChatMemberUpdated.php b/src/TgBotLib/Objects/Telegram/ChatMemberUpdated.php index 41246f1..10d9b76 100644 --- a/src/TgBotLib/Objects/Telegram/ChatMemberUpdated.php +++ b/src/TgBotLib/Objects/Telegram/ChatMemberUpdated.php @@ -120,9 +120,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChatMemberUpdated */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ChatPermissions.php b/src/TgBotLib/Objects/Telegram/ChatPermissions.php index 3c87fdc..55c36c7 100644 --- a/src/TgBotLib/Objects/Telegram/ChatPermissions.php +++ b/src/TgBotLib/Objects/Telegram/ChatPermissions.php @@ -249,10 +249,10 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChatPermissions * @noinspection DuplicatedCode */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ChatShared.php b/src/TgBotLib/Objects/Telegram/ChatShared.php index 86de4ab..eeef225 100644 --- a/src/TgBotLib/Objects/Telegram/ChatShared.php +++ b/src/TgBotLib/Objects/Telegram/ChatShared.php @@ -59,9 +59,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChatShared */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ChosenInlineResult.php b/src/TgBotLib/Objects/Telegram/ChosenInlineResult.php index 7943e2b..912cf20 100644 --- a/src/TgBotLib/Objects/Telegram/ChosenInlineResult.php +++ b/src/TgBotLib/Objects/Telegram/ChosenInlineResult.php @@ -107,9 +107,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ChosenInlineResult */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/Contact.php b/src/TgBotLib/Objects/Telegram/Contact.php index 412b7b8..012dbe3 100644 --- a/src/TgBotLib/Objects/Telegram/Contact.php +++ b/src/TgBotLib/Objects/Telegram/Contact.php @@ -105,9 +105,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return Contact */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/Dice.php b/src/TgBotLib/Objects/Telegram/Dice.php index 475554f..1d5d99e 100644 --- a/src/TgBotLib/Objects/Telegram/Dice.php +++ b/src/TgBotLib/Objects/Telegram/Dice.php @@ -51,9 +51,9 @@ * Constructs object from array representation * * @param array $data - * @return ObjectTypeInterface + * @return Dice */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/Document.php b/src/TgBotLib/Objects/Telegram/Document.php index ad945ee..dd68c09 100644 --- a/src/TgBotLib/Objects/Telegram/Document.php +++ b/src/TgBotLib/Objects/Telegram/Document.php @@ -122,9 +122,9 @@ * Constructs the object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return Document */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); $object->file_id = $data['file_id'] ?? null; diff --git a/src/TgBotLib/Objects/Telegram/EncryptedCredentials.php b/src/TgBotLib/Objects/Telegram/EncryptedCredentials.php index b516f90..03f9087 100644 --- a/src/TgBotLib/Objects/Telegram/EncryptedCredentials.php +++ b/src/TgBotLib/Objects/Telegram/EncryptedCredentials.php @@ -73,9 +73,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return EncryptedCredentials */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/EncryptedPassportElement.php b/src/TgBotLib/Objects/Telegram/EncryptedPassportElement.php index 0b3b3b7..5eeefa2 100644 --- a/src/TgBotLib/Objects/Telegram/EncryptedPassportElement.php +++ b/src/TgBotLib/Objects/Telegram/EncryptedPassportElement.php @@ -240,9 +240,9 @@ * Constructs object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return EncryptedPassportElement */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new static(); diff --git a/src/TgBotLib/Objects/Telegram/File.php b/src/TgBotLib/Objects/Telegram/File.php index 27fc6ae..aa6d395 100644 --- a/src/TgBotLib/Objects/Telegram/File.php +++ b/src/TgBotLib/Objects/Telegram/File.php @@ -90,9 +90,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return File */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): File { $object = new self(); $object->file_id = $data['file_id'] ?? null; diff --git a/src/TgBotLib/Objects/Telegram/ForceReply.php b/src/TgBotLib/Objects/Telegram/ForceReply.php index 7d7a1ab..d3830f8 100644 --- a/src/TgBotLib/Objects/Telegram/ForceReply.php +++ b/src/TgBotLib/Objects/Telegram/ForceReply.php @@ -73,9 +73,9 @@ * Constructs an object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ForceReply */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ForumTopic.php b/src/TgBotLib/Objects/Telegram/ForumTopic.php index a585de9..48c422a 100644 --- a/src/TgBotLib/Objects/Telegram/ForumTopic.php +++ b/src/TgBotLib/Objects/Telegram/ForumTopic.php @@ -87,9 +87,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ForumTopic */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ForumTopicClosed.php b/src/TgBotLib/Objects/Telegram/ForumTopicClosed.php index bd42b0f..17169c9 100644 --- a/src/TgBotLib/Objects/Telegram/ForumTopicClosed.php +++ b/src/TgBotLib/Objects/Telegram/ForumTopicClosed.php @@ -23,9 +23,9 @@ * Returns object from array * * @param array $data - * @return ObjectTypeInterface + * @return ForumTopicClosed */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { return new self(); } diff --git a/src/TgBotLib/Objects/Telegram/ForumTopicCreated.php b/src/TgBotLib/Objects/Telegram/ForumTopicCreated.php index 5e07e67..2af8a04 100644 --- a/src/TgBotLib/Objects/Telegram/ForumTopicCreated.php +++ b/src/TgBotLib/Objects/Telegram/ForumTopicCreated.php @@ -71,9 +71,9 @@ * Constructs the object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return ForumTopicCreated */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ForumTopicEdited.php b/src/TgBotLib/Objects/Telegram/ForumTopicEdited.php index e9316fa..ffbc996 100644 --- a/src/TgBotLib/Objects/Telegram/ForumTopicEdited.php +++ b/src/TgBotLib/Objects/Telegram/ForumTopicEdited.php @@ -56,9 +56,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ForumTopicEdited */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ForumTopicReopened.php b/src/TgBotLib/Objects/Telegram/ForumTopicReopened.php index 0d846af..df8fdff 100644 --- a/src/TgBotLib/Objects/Telegram/ForumTopicReopened.php +++ b/src/TgBotLib/Objects/Telegram/ForumTopicReopened.php @@ -23,9 +23,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ForumTopicReopened */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { return new self(); } diff --git a/src/TgBotLib/Objects/Telegram/Game.php b/src/TgBotLib/Objects/Telegram/Game.php index 318dd34..5468ac9 100644 --- a/src/TgBotLib/Objects/Telegram/Game.php +++ b/src/TgBotLib/Objects/Telegram/Game.php @@ -127,9 +127,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return Game */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/GeneralForumTopicHidden.php b/src/TgBotLib/Objects/Telegram/GeneralForumTopicHidden.php index 2bfd3f2..c839b7a 100644 --- a/src/TgBotLib/Objects/Telegram/GeneralForumTopicHidden.php +++ b/src/TgBotLib/Objects/Telegram/GeneralForumTopicHidden.php @@ -23,9 +23,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return GeneralForumTopicHidden */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { return new self(); } diff --git a/src/TgBotLib/Objects/Telegram/GeneralForumTopicUnhidden.php b/src/TgBotLib/Objects/Telegram/GeneralForumTopicUnhidden.php index 11f93cf..5ad04ba 100644 --- a/src/TgBotLib/Objects/Telegram/GeneralForumTopicUnhidden.php +++ b/src/TgBotLib/Objects/Telegram/GeneralForumTopicUnhidden.php @@ -23,9 +23,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return GeneralForumTopicUnhidden */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { return new self(); } diff --git a/src/TgBotLib/Objects/Telegram/InlineKeyboardButton.php b/src/TgBotLib/Objects/Telegram/InlineKeyboardButton.php index d05250d..c6144eb 100644 --- a/src/TgBotLib/Objects/Telegram/InlineKeyboardButton.php +++ b/src/TgBotLib/Objects/Telegram/InlineKeyboardButton.php @@ -186,9 +186,9 @@ * Constructs a new InlineKeyboardButton object from an array * * @param array $data - * @return ObjectTypeInterface + * @return InlineKeyboardButton */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/InlineKeyboardMarkup.php b/src/TgBotLib/Objects/Telegram/InlineKeyboardMarkup.php index 8504485..fb8b81b 100644 --- a/src/TgBotLib/Objects/Telegram/InlineKeyboardMarkup.php +++ b/src/TgBotLib/Objects/Telegram/InlineKeyboardMarkup.php @@ -49,9 +49,9 @@ * Constructs the object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return InlineKeyboardMarkup */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/InlineQuery.php b/src/TgBotLib/Objects/Telegram/InlineQuery.php index c3e4cd6..73f06d8 100644 --- a/src/TgBotLib/Objects/Telegram/InlineQuery.php +++ b/src/TgBotLib/Objects/Telegram/InlineQuery.php @@ -122,9 +122,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return InlineQuery */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/InputMedia.php b/src/TgBotLib/Objects/Telegram/InputMedia.php index c213f04..32dccba 100644 --- a/src/TgBotLib/Objects/Telegram/InputMedia.php +++ b/src/TgBotLib/Objects/Telegram/InputMedia.php @@ -259,9 +259,9 @@ * Constructs a new object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return InputMedia */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); $object->type = $data['type'] ?? null; diff --git a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaAnimation.php b/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaAnimation.php index e4d3796..02fb20b 100644 --- a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaAnimation.php +++ b/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaAnimation.php @@ -202,10 +202,10 @@ * Constructs object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return InputMediaAnimation * @noinspection DuplicatedCode */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new static(); $object->type = $data['type'] ?? InputMediaType::Animation; diff --git a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaAudio.php b/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaAudio.php index a74a1cd..ff4d4eb 100644 --- a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaAudio.php +++ b/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaAudio.php @@ -183,10 +183,10 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return InputMediaAudio * @noinspection DuplicatedCode */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new InputMediaAudio(); diff --git a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaDocument.php b/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaDocument.php index 1c9a8b7..7e2cb21 100644 --- a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaDocument.php +++ b/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaDocument.php @@ -153,10 +153,10 @@ * Constructs object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return InputMediaDocument * @noinspection DuplicatedCode */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new InputMediaDocument(); $object->type = $data['type'] ?? null; diff --git a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaPhoto.php b/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaPhoto.php index 9e2fc74..fc1fbef 100644 --- a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaPhoto.php +++ b/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaPhoto.php @@ -131,9 +131,9 @@ * Constructs the object from an array * * @param array $data - * @return ObjectTypeInterface + * @return InputMediaPhoto */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaVideo.php b/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaVideo.php index c5a7f55..1db7950 100644 --- a/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaVideo.php +++ b/src/TgBotLib/Objects/Telegram/InputMedia/InputMediaVideo.php @@ -216,10 +216,10 @@ * Constructs object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return InputMediaVideo * @noinspection DuplicatedCode */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new InputMediaVideo(); diff --git a/src/TgBotLib/Objects/Telegram/Invoice.php b/src/TgBotLib/Objects/Telegram/Invoice.php index cabf099..9ad567a 100644 --- a/src/TgBotLib/Objects/Telegram/Invoice.php +++ b/src/TgBotLib/Objects/Telegram/Invoice.php @@ -107,9 +107,9 @@ * Constructs an object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return Invoice */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/KeyboardButton.php b/src/TgBotLib/Objects/Telegram/KeyboardButton.php index cc3f0cc..a4df1ac 100644 --- a/src/TgBotLib/Objects/Telegram/KeyboardButton.php +++ b/src/TgBotLib/Objects/Telegram/KeyboardButton.php @@ -143,9 +143,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return KeyboardButton */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/KeyboardButtonPollType.php b/src/TgBotLib/Objects/Telegram/KeyboardButtonPollType.php index f6639b8..2cee2cf 100644 --- a/src/TgBotLib/Objects/Telegram/KeyboardButtonPollType.php +++ b/src/TgBotLib/Objects/Telegram/KeyboardButtonPollType.php @@ -41,9 +41,9 @@ * Constructs the object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return KeyboardButtonPollType */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/KeyboardButtonRequestChat.php b/src/TgBotLib/Objects/Telegram/KeyboardButtonRequestChat.php index 2258a71..c41dd2b 100644 --- a/src/TgBotLib/Objects/Telegram/KeyboardButtonRequestChat.php +++ b/src/TgBotLib/Objects/Telegram/KeyboardButtonRequestChat.php @@ -160,9 +160,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return KeyboardButtonRequestChat */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/KeyboardButtonRequestUser.php b/src/TgBotLib/Objects/Telegram/KeyboardButtonRequestUser.php index 802cf2d..d0d6eec 100644 --- a/src/TgBotLib/Objects/Telegram/KeyboardButtonRequestUser.php +++ b/src/TgBotLib/Objects/Telegram/KeyboardButtonRequestUser.php @@ -75,9 +75,9 @@ * Constructs object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return KeyboardButtonRequestUser */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/LabeledPrice.php b/src/TgBotLib/Objects/Telegram/LabeledPrice.php index 7384356..b9be966 100644 --- a/src/TgBotLib/Objects/Telegram/LabeledPrice.php +++ b/src/TgBotLib/Objects/Telegram/LabeledPrice.php @@ -59,9 +59,9 @@ * Constructs the object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return LabeledPrice */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/Location.php b/src/TgBotLib/Objects/Telegram/Location.php index 1cb6e5d..f4a9fc6 100644 --- a/src/TgBotLib/Objects/Telegram/Location.php +++ b/src/TgBotLib/Objects/Telegram/Location.php @@ -121,9 +121,9 @@ * Constructs an object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return Location */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/LoginUrl.php b/src/TgBotLib/Objects/Telegram/LoginUrl.php index bdfffe4..d586047 100644 --- a/src/TgBotLib/Objects/Telegram/LoginUrl.php +++ b/src/TgBotLib/Objects/Telegram/LoginUrl.php @@ -94,9 +94,9 @@ * Constructs the object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return LoginUrl */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/MaskPosition.php b/src/TgBotLib/Objects/Telegram/MaskPosition.php index 3241364..7879c08 100644 --- a/src/TgBotLib/Objects/Telegram/MaskPosition.php +++ b/src/TgBotLib/Objects/Telegram/MaskPosition.php @@ -90,9 +90,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return MaskPosition */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/MenuButton.php b/src/TgBotLib/Objects/Telegram/MenuButton.php index 2ec21c6..15c5bb8 100644 --- a/src/TgBotLib/Objects/Telegram/MenuButton.php +++ b/src/TgBotLib/Objects/Telegram/MenuButton.php @@ -72,9 +72,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return MenuButton */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/MenuButton/MenuButtonCommands.php b/src/TgBotLib/Objects/Telegram/MenuButton/MenuButtonCommands.php index d9111ad..2a451bf 100644 --- a/src/TgBotLib/Objects/Telegram/MenuButton/MenuButtonCommands.php +++ b/src/TgBotLib/Objects/Telegram/MenuButton/MenuButtonCommands.php @@ -40,9 +40,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return MenuButtonCommands */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/MenuButton/MenuButtonDefault.php b/src/TgBotLib/Objects/Telegram/MenuButton/MenuButtonDefault.php index 14c2dfb..6ef7253 100644 --- a/src/TgBotLib/Objects/Telegram/MenuButton/MenuButtonDefault.php +++ b/src/TgBotLib/Objects/Telegram/MenuButton/MenuButtonDefault.php @@ -40,9 +40,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return MenuButtonDefault */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/MenuButton/MenuButtonWebApp.php b/src/TgBotLib/Objects/Telegram/MenuButton/MenuButtonWebApp.php index 873be48..adf28c8 100644 --- a/src/TgBotLib/Objects/Telegram/MenuButton/MenuButtonWebApp.php +++ b/src/TgBotLib/Objects/Telegram/MenuButton/MenuButtonWebApp.php @@ -75,9 +75,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return MenuButtonWebApp */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/MessageAutoDeleteTimerChanged.php b/src/TgBotLib/Objects/Telegram/MessageAutoDeleteTimerChanged.php index 3ed17d0..5bbd393 100644 --- a/src/TgBotLib/Objects/Telegram/MessageAutoDeleteTimerChanged.php +++ b/src/TgBotLib/Objects/Telegram/MessageAutoDeleteTimerChanged.php @@ -37,9 +37,9 @@ * Constructs the object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return MessageAutoDeleteTimerChanged */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/MessageEntity.php b/src/TgBotLib/Objects/Telegram/MessageEntity.php index 78fdc43..ec40a5a 100644 --- a/src/TgBotLib/Objects/Telegram/MessageEntity.php +++ b/src/TgBotLib/Objects/Telegram/MessageEntity.php @@ -142,9 +142,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return MessageEntity */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/OrderInfo.php b/src/TgBotLib/Objects/Telegram/OrderInfo.php index 6268fd8..933b533 100644 --- a/src/TgBotLib/Objects/Telegram/OrderInfo.php +++ b/src/TgBotLib/Objects/Telegram/OrderInfo.php @@ -87,9 +87,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return OrderInfo */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/PassportData.php b/src/TgBotLib/Objects/Telegram/PassportData.php index 4237df2..560be84 100644 --- a/src/TgBotLib/Objects/Telegram/PassportData.php +++ b/src/TgBotLib/Objects/Telegram/PassportData.php @@ -62,9 +62,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return PassportData */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); $object->data = array_map(function (array $element) diff --git a/src/TgBotLib/Objects/Telegram/PassportFile.php b/src/TgBotLib/Objects/Telegram/PassportFile.php index 080d725..c0eb72c 100644 --- a/src/TgBotLib/Objects/Telegram/PassportFile.php +++ b/src/TgBotLib/Objects/Telegram/PassportFile.php @@ -88,9 +88,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return PassportFile */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/PhotoSize.php b/src/TgBotLib/Objects/Telegram/PhotoSize.php index 415874a..ee35af5 100644 --- a/src/TgBotLib/Objects/Telegram/PhotoSize.php +++ b/src/TgBotLib/Objects/Telegram/PhotoSize.php @@ -105,10 +105,10 @@ * Constructs an object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return PhotoSize * @noinspection DuplicatedCode */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/Poll.php b/src/TgBotLib/Objects/Telegram/Poll.php index e6e6c42..11ca2aa 100644 --- a/src/TgBotLib/Objects/Telegram/Poll.php +++ b/src/TgBotLib/Objects/Telegram/Poll.php @@ -239,9 +239,9 @@ * Constructs object from array representation * * @param array $data - * @return ObjectTypeInterface + * @return Poll */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/PollAnswer.php b/src/TgBotLib/Objects/Telegram/PollAnswer.php index af880d9..76926c9 100644 --- a/src/TgBotLib/Objects/Telegram/PollAnswer.php +++ b/src/TgBotLib/Objects/Telegram/PollAnswer.php @@ -71,9 +71,9 @@ * Constructs an object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return PollAnswer */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/PollOption.php b/src/TgBotLib/Objects/Telegram/PollOption.php index f2b4cce..275acd9 100644 --- a/src/TgBotLib/Objects/Telegram/PollOption.php +++ b/src/TgBotLib/Objects/Telegram/PollOption.php @@ -55,9 +55,9 @@ * Constructs an object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return PollOption */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/PreCheckoutQuery.php b/src/TgBotLib/Objects/Telegram/PreCheckoutQuery.php index 99eed9e..c83dde9 100644 --- a/src/TgBotLib/Objects/Telegram/PreCheckoutQuery.php +++ b/src/TgBotLib/Objects/Telegram/PreCheckoutQuery.php @@ -138,9 +138,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return PreCheckoutQuery */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); $object->id = $data['id'] ?? null; diff --git a/src/TgBotLib/Objects/Telegram/ProximityAlertTriggered.php b/src/TgBotLib/Objects/Telegram/ProximityAlertTriggered.php index e7f2f3c..9df48e1 100644 --- a/src/TgBotLib/Objects/Telegram/ProximityAlertTriggered.php +++ b/src/TgBotLib/Objects/Telegram/ProximityAlertTriggered.php @@ -71,9 +71,9 @@ * Constructs the object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return ProximityAlertTriggered */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); $object->traveler = isset($data['traveler']) && is_array($data['traveler']) ? User::fromArray($data['traveler']) : $data['traveler']; diff --git a/src/TgBotLib/Objects/Telegram/ReplyKeyboardMarkup.php b/src/TgBotLib/Objects/Telegram/ReplyKeyboardMarkup.php index c519020..b043d41 100644 --- a/src/TgBotLib/Objects/Telegram/ReplyKeyboardMarkup.php +++ b/src/TgBotLib/Objects/Telegram/ReplyKeyboardMarkup.php @@ -129,9 +129,9 @@ * Constructs object from array representation. * * @param array $data - * @return ObjectTypeInterface + * @return ReplyKeyboardMarkup */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ReplyKeyboardRemove.php b/src/TgBotLib/Objects/Telegram/ReplyKeyboardRemove.php index 0a608d3..6ed711a 100644 --- a/src/TgBotLib/Objects/Telegram/ReplyKeyboardRemove.php +++ b/src/TgBotLib/Objects/Telegram/ReplyKeyboardRemove.php @@ -61,9 +61,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ReplyKeyboardRemove */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); $object->remove_keyboard = $data['remove_keyboard'] ?? false; diff --git a/src/TgBotLib/Objects/Telegram/ResponseParameters.php b/src/TgBotLib/Objects/Telegram/ResponseParameters.php index c01fedc..0a0e199 100644 --- a/src/TgBotLib/Objects/Telegram/ResponseParameters.php +++ b/src/TgBotLib/Objects/Telegram/ResponseParameters.php @@ -59,9 +59,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ResponseParameters */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ShippingAddress.php b/src/TgBotLib/Objects/Telegram/ShippingAddress.php index 3253bc8..fe9032e 100644 --- a/src/TgBotLib/Objects/Telegram/ShippingAddress.php +++ b/src/TgBotLib/Objects/Telegram/ShippingAddress.php @@ -119,9 +119,9 @@ * Constructs object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return ShippingAddress */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/ShippingOption.php b/src/TgBotLib/Objects/Telegram/ShippingOption.php index 3f9d9dd..d54280f 100644 --- a/src/TgBotLib/Objects/Telegram/ShippingOption.php +++ b/src/TgBotLib/Objects/Telegram/ShippingOption.php @@ -73,9 +73,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ShippingOption */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); $object->id = $data['id']; diff --git a/src/TgBotLib/Objects/Telegram/ShippingQuery.php b/src/TgBotLib/Objects/Telegram/ShippingQuery.php index 48e19f1..c723fab 100644 --- a/src/TgBotLib/Objects/Telegram/ShippingQuery.php +++ b/src/TgBotLib/Objects/Telegram/ShippingQuery.php @@ -87,9 +87,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return ShippingQuery */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/Sticker.php b/src/TgBotLib/Objects/Telegram/Sticker.php index 18b5d0c..32e6015 100644 --- a/src/TgBotLib/Objects/Telegram/Sticker.php +++ b/src/TgBotLib/Objects/Telegram/Sticker.php @@ -251,9 +251,9 @@ * Constructs object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return Sticker */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new static(); diff --git a/src/TgBotLib/Objects/Telegram/SuccessfulPayment.php b/src/TgBotLib/Objects/Telegram/SuccessfulPayment.php index e6111bc..7f12c19 100644 --- a/src/TgBotLib/Objects/Telegram/SuccessfulPayment.php +++ b/src/TgBotLib/Objects/Telegram/SuccessfulPayment.php @@ -139,9 +139,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return SuccessfulPayment */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/Update.php b/src/TgBotLib/Objects/Telegram/Update.php index e114ea9..7f8cc91 100644 --- a/src/TgBotLib/Objects/Telegram/Update.php +++ b/src/TgBotLib/Objects/Telegram/Update.php @@ -274,9 +274,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return Update */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new static(); diff --git a/src/TgBotLib/Objects/Telegram/UserProfilePhotos.php b/src/TgBotLib/Objects/Telegram/UserProfilePhotos.php index e862a44..2481a77 100644 --- a/src/TgBotLib/Objects/Telegram/UserProfilePhotos.php +++ b/src/TgBotLib/Objects/Telegram/UserProfilePhotos.php @@ -47,8 +47,10 @@ { return [ 'total_count' => $this->total_count, - 'photos' => array_map(function (array $photo) { - return array_map(function (PhotoSize $photoSize) { + 'photos' => array_map(function (array $photo) + { + return array_map(function (PhotoSize $photoSize) + { return $photoSize->toArray(); }, $photo); }, $this->photos), @@ -59,14 +61,16 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return UserProfilePhotos */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): UserProfilePhotos { $object = new self(); $object->total_count = $data['total_count']; - $object->photos = array_map(function (array $photo) { - return array_map(function (array $photoSize) { + $object->photos = array_map(function (array $photo) + { + return array_map(function (array $photoSize) + { return PhotoSize::fromArray($photoSize); }, $photo); }, $data['photos']); diff --git a/src/TgBotLib/Objects/Telegram/UserShared.php b/src/TgBotLib/Objects/Telegram/UserShared.php index 24c3022..f41a8a0 100644 --- a/src/TgBotLib/Objects/Telegram/UserShared.php +++ b/src/TgBotLib/Objects/Telegram/UserShared.php @@ -57,9 +57,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return UserShared */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/Venue.php b/src/TgBotLib/Objects/Telegram/Venue.php index fd1fbc1..9e344b8 100644 --- a/src/TgBotLib/Objects/Telegram/Venue.php +++ b/src/TgBotLib/Objects/Telegram/Venue.php @@ -135,9 +135,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return Venue */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/Video.php b/src/TgBotLib/Objects/Telegram/Video.php index 2a99594..1edc854 100644 --- a/src/TgBotLib/Objects/Telegram/Video.php +++ b/src/TgBotLib/Objects/Telegram/Video.php @@ -168,9 +168,9 @@ * Constructs the object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return Video */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/VideoChatEnded.php b/src/TgBotLib/Objects/Telegram/VideoChatEnded.php index 743ccb3..2408738 100644 --- a/src/TgBotLib/Objects/Telegram/VideoChatEnded.php +++ b/src/TgBotLib/Objects/Telegram/VideoChatEnded.php @@ -37,9 +37,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return VideoChatEnded */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); $object->duration = $data['duration']; diff --git a/src/TgBotLib/Objects/Telegram/VideoChatParticipantsInvited.php b/src/TgBotLib/Objects/Telegram/VideoChatParticipantsInvited.php index bc131f3..eab7442 100644 --- a/src/TgBotLib/Objects/Telegram/VideoChatParticipantsInvited.php +++ b/src/TgBotLib/Objects/Telegram/VideoChatParticipantsInvited.php @@ -31,9 +31,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return VideoChatParticipantsInvited */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); $object->users = array_map(function (array $user) { diff --git a/src/TgBotLib/Objects/Telegram/VideoChatScheduled.php b/src/TgBotLib/Objects/Telegram/VideoChatScheduled.php index 132801a..d5cee59 100644 --- a/src/TgBotLib/Objects/Telegram/VideoChatScheduled.php +++ b/src/TgBotLib/Objects/Telegram/VideoChatScheduled.php @@ -39,9 +39,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return VideoChatScheduled */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); $object->start_date = $data['start_date']; diff --git a/src/TgBotLib/Objects/Telegram/VideoChatStarted.php b/src/TgBotLib/Objects/Telegram/VideoChatStarted.php index 0db38d5..36b5906 100644 --- a/src/TgBotLib/Objects/Telegram/VideoChatStarted.php +++ b/src/TgBotLib/Objects/Telegram/VideoChatStarted.php @@ -23,9 +23,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return VideoChatStarted */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { return new self(); } diff --git a/src/TgBotLib/Objects/Telegram/VideoNote.php b/src/TgBotLib/Objects/Telegram/VideoNote.php index d66bb64..61be4cb 100644 --- a/src/TgBotLib/Objects/Telegram/VideoNote.php +++ b/src/TgBotLib/Objects/Telegram/VideoNote.php @@ -118,9 +118,9 @@ * Constructs the object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return VideoNote */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/Voice.php b/src/TgBotLib/Objects/Telegram/Voice.php index 9db73fd..cf93a66 100644 --- a/src/TgBotLib/Objects/Telegram/Voice.php +++ b/src/TgBotLib/Objects/Telegram/Voice.php @@ -105,9 +105,9 @@ * Constructs object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return Voice */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/WebAppData.php b/src/TgBotLib/Objects/Telegram/WebAppData.php index cafebe3..f924405 100644 --- a/src/TgBotLib/Objects/Telegram/WebAppData.php +++ b/src/TgBotLib/Objects/Telegram/WebAppData.php @@ -54,9 +54,9 @@ * Constructs the object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return WebAppData */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); diff --git a/src/TgBotLib/Objects/Telegram/WebAppInfo.php b/src/TgBotLib/Objects/Telegram/WebAppInfo.php index 4b979ac..52a9c35 100644 --- a/src/TgBotLib/Objects/Telegram/WebAppInfo.php +++ b/src/TgBotLib/Objects/Telegram/WebAppInfo.php @@ -38,9 +38,9 @@ * Constructs the object from an array representation. * * @param array $data - * @return ObjectTypeInterface + * @return WebAppInfo */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { $object = new self(); $object->url = $data['url']; diff --git a/src/TgBotLib/Objects/Telegram/WriteAccessAllowed.php b/src/TgBotLib/Objects/Telegram/WriteAccessAllowed.php index 9ae5077..10ad159 100644 --- a/src/TgBotLib/Objects/Telegram/WriteAccessAllowed.php +++ b/src/TgBotLib/Objects/Telegram/WriteAccessAllowed.php @@ -23,9 +23,9 @@ * Convert object from an array representation * * @param array $data - * @return ObjectTypeInterface + * @return WriteAccessAllowed */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(array $data): self { return new self(); }