Changed return types

This commit is contained in:
Netkas 2023-02-16 15:27:57 -05:00
parent 0fe5f5735a
commit 69c025af05
99 changed files with 206 additions and 202 deletions

View file

@ -170,9 +170,9 @@
* Constructs the object from an array representation * Constructs the object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return Animation
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -165,9 +165,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return Audio
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -55,9 +55,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return BotCommand
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -75,9 +75,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @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'])) if(isset($data['type']))
{ {

View file

@ -57,9 +57,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return BotCommandScopeAllChatAdministrators
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -41,9 +41,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return BotCommandScopeAllGroupChats
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -41,9 +41,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return BotCommandScopeAllPrivateChats
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -57,9 +57,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return BotCommandScopeChat
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -41,9 +41,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return BotCommandScopeChatAdministrators
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -73,9 +73,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return BotCommandScopeChatMember
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -41,9 +41,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return BotCommandScopeDefault
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -22,9 +22,9 @@
* Constructs an object from an array representation. * Constructs an object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return CallbackGame
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
return new self(); return new self();
} }

View file

@ -140,9 +140,9 @@
* Constructs CallbackQuery object from an array representation * Constructs CallbackQuery object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return CallbackQuery
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -507,9 +507,9 @@
* Constructs a new Chat object from an array representation. * Constructs a new Chat object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return Chat
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -219,10 +219,10 @@
* Constructs the object from an array representation * Constructs the object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChatAdministratorRights
* @noinspection DuplicatedCode * @noinspection DuplicatedCode
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -168,9 +168,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChatInviteLink
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -123,9 +123,9 @@
* Constructs ChatJoinRequest object from an array representation * Constructs ChatJoinRequest object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChatJoinRequest
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -55,9 +55,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChatLocation
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -475,10 +475,10 @@
* Constructs an object from an array representation * Constructs an object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChatMember
* @noinspection DuplicatedCode * @noinspection DuplicatedCode
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new static(); $object = new static();

View file

@ -285,10 +285,10 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChatMemberAdministrator
* @noinspection DuplicatedCode * @noinspection DuplicatedCode
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -74,9 +74,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChatMemberBanned
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -58,9 +58,9 @@
* Constructs the object from an array representation * Constructs the object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChatMemberLeft
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -58,9 +58,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChatMemberMember
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -90,9 +90,9 @@
* Constructs ChatMemberOwner object from an array representation * Constructs ChatMemberOwner object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChatMemberOwner
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new ChatMemberOwner(); $object = new ChatMemberOwner();

View file

@ -314,10 +314,10 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChatMemberRestricted
* @noinspection DuplicatedCode * @noinspection DuplicatedCode
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new static(); $object = new static();

View file

@ -120,9 +120,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChatMemberUpdated
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -249,10 +249,10 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChatPermissions
* @noinspection DuplicatedCode * @noinspection DuplicatedCode
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -59,9 +59,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChatShared
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -107,9 +107,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ChosenInlineResult
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -105,9 +105,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return Contact
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -51,9 +51,9 @@
* Constructs object from array representation * Constructs object from array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return Dice
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -122,9 +122,9 @@
* Constructs the object from an array representation * Constructs the object from an array representation
* *
* @param array $data * @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 = new self();
$object->file_id = $data['file_id'] ?? null; $object->file_id = $data['file_id'] ?? null;

View file

@ -73,9 +73,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return EncryptedCredentials
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -240,9 +240,9 @@
* Constructs object from an array representation. * Constructs object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return EncryptedPassportElement
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new static(); $object = new static();

View file

@ -90,9 +90,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @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 = new self();
$object->file_id = $data['file_id'] ?? null; $object->file_id = $data['file_id'] ?? null;

View file

@ -73,9 +73,9 @@
* Constructs an object from an array representation * Constructs an object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ForceReply
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -87,9 +87,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ForumTopic
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -23,9 +23,9 @@
* Returns object from array * Returns object from array
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ForumTopicClosed
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
return new self(); return new self();
} }

View file

@ -71,9 +71,9 @@
* Constructs the object from an array representation. * Constructs the object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ForumTopicCreated
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -56,9 +56,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ForumTopicEdited
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -23,9 +23,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ForumTopicReopened
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
return new self(); return new self();
} }

View file

@ -127,9 +127,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return Game
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -23,9 +23,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return GeneralForumTopicHidden
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
return new self(); return new self();
} }

View file

@ -23,9 +23,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return GeneralForumTopicUnhidden
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
return new self(); return new self();
} }

View file

@ -186,9 +186,9 @@
* Constructs a new InlineKeyboardButton object from an array * Constructs a new InlineKeyboardButton object from an array
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return InlineKeyboardButton
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -49,9 +49,9 @@
* Constructs the object from an array representation * Constructs the object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return InlineKeyboardMarkup
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -122,9 +122,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return InlineQuery
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -259,9 +259,9 @@
* Constructs a new object from an array representation. * Constructs a new object from an array representation.
* *
* @param array $data * @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 = new self();
$object->type = $data['type'] ?? null; $object->type = $data['type'] ?? null;

View file

@ -202,10 +202,10 @@
* Constructs object from an array representation. * Constructs object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return InputMediaAnimation
* @noinspection DuplicatedCode * @noinspection DuplicatedCode
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new static(); $object = new static();
$object->type = $data['type'] ?? InputMediaType::Animation; $object->type = $data['type'] ?? InputMediaType::Animation;

View file

@ -183,10 +183,10 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return InputMediaAudio
* @noinspection DuplicatedCode * @noinspection DuplicatedCode
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new InputMediaAudio(); $object = new InputMediaAudio();

View file

@ -153,10 +153,10 @@
* Constructs object from an array representation. * Constructs object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return InputMediaDocument
* @noinspection DuplicatedCode * @noinspection DuplicatedCode
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new InputMediaDocument(); $object = new InputMediaDocument();
$object->type = $data['type'] ?? null; $object->type = $data['type'] ?? null;

View file

@ -131,9 +131,9 @@
* Constructs the object from an array * Constructs the object from an array
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return InputMediaPhoto
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -216,10 +216,10 @@
* Constructs object from an array representation. * Constructs object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return InputMediaVideo
* @noinspection DuplicatedCode * @noinspection DuplicatedCode
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new InputMediaVideo(); $object = new InputMediaVideo();

View file

@ -107,9 +107,9 @@
* Constructs an object from an array representation. * Constructs an object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return Invoice
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -143,9 +143,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return KeyboardButton
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -41,9 +41,9 @@
* Constructs the object from an array representation * Constructs the object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return KeyboardButtonPollType
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -160,9 +160,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return KeyboardButtonRequestChat
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -75,9 +75,9 @@
* Constructs object from an array representation. * Constructs object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return KeyboardButtonRequestUser
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -59,9 +59,9 @@
* Constructs the object from an array representation * Constructs the object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return LabeledPrice
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -121,9 +121,9 @@
* Constructs an object from an array representation. * Constructs an object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return Location
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -94,9 +94,9 @@
* Constructs the object from an array representation * Constructs the object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return LoginUrl
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -90,9 +90,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return MaskPosition
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -72,9 +72,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return MenuButton
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -40,9 +40,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return MenuButtonCommands
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -40,9 +40,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return MenuButtonDefault
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -75,9 +75,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return MenuButtonWebApp
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -37,9 +37,9 @@
* Constructs the object from an array representation. * Constructs the object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return MessageAutoDeleteTimerChanged
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -142,9 +142,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return MessageEntity
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -87,9 +87,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return OrderInfo
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -62,9 +62,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @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 = new self();
$object->data = array_map(function (array $element) $object->data = array_map(function (array $element)

View file

@ -88,9 +88,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return PassportFile
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -105,10 +105,10 @@
* Constructs an object from an array representation * Constructs an object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return PhotoSize
* @noinspection DuplicatedCode * @noinspection DuplicatedCode
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -239,9 +239,9 @@
* Constructs object from array representation * Constructs object from array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return Poll
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -71,9 +71,9 @@
* Constructs an object from an array representation * Constructs an object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return PollAnswer
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -55,9 +55,9 @@
* Constructs an object from an array representation * Constructs an object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return PollOption
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -138,9 +138,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @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 = new self();
$object->id = $data['id'] ?? null; $object->id = $data['id'] ?? null;

View file

@ -71,9 +71,9 @@
* Constructs the object from an array representation. * Constructs the object from an array representation.
* *
* @param array $data * @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 = new self();
$object->traveler = isset($data['traveler']) && is_array($data['traveler']) ? User::fromArray($data['traveler']) : $data['traveler']; $object->traveler = isset($data['traveler']) && is_array($data['traveler']) ? User::fromArray($data['traveler']) : $data['traveler'];

View file

@ -129,9 +129,9 @@
* Constructs object from array representation. * Constructs object from array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ReplyKeyboardMarkup
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -61,9 +61,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @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 = new self();
$object->remove_keyboard = $data['remove_keyboard'] ?? false; $object->remove_keyboard = $data['remove_keyboard'] ?? false;

View file

@ -59,9 +59,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ResponseParameters
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -119,9 +119,9 @@
* Constructs object from an array representation. * Constructs object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ShippingAddress
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -73,9 +73,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @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 = new self();
$object->id = $data['id']; $object->id = $data['id'];

View file

@ -87,9 +87,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return ShippingQuery
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -251,9 +251,9 @@
* Constructs object from an array representation. * Constructs object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return Sticker
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new static(); $object = new static();

View file

@ -139,9 +139,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return SuccessfulPayment
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -274,9 +274,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return Update
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new static(); $object = new static();

View file

@ -47,8 +47,10 @@
{ {
return [ return [
'total_count' => $this->total_count, 'total_count' => $this->total_count,
'photos' => array_map(function (array $photo) { 'photos' => array_map(function (array $photo)
return array_map(function (PhotoSize $photoSize) { {
return array_map(function (PhotoSize $photoSize)
{
return $photoSize->toArray(); return $photoSize->toArray();
}, $photo); }, $photo);
}, $this->photos), }, $this->photos),
@ -59,14 +61,16 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @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 = new self();
$object->total_count = $data['total_count']; $object->total_count = $data['total_count'];
$object->photos = array_map(function (array $photo) { $object->photos = array_map(function (array $photo)
return array_map(function (array $photoSize) { {
return array_map(function (array $photoSize)
{
return PhotoSize::fromArray($photoSize); return PhotoSize::fromArray($photoSize);
}, $photo); }, $photo);
}, $data['photos']); }, $data['photos']);

View file

@ -57,9 +57,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return UserShared
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -135,9 +135,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return Venue
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -168,9 +168,9 @@
* Constructs the object from an array representation. * Constructs the object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return Video
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -37,9 +37,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @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 = new self();
$object->duration = $data['duration']; $object->duration = $data['duration'];

View file

@ -31,9 +31,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @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 = new self();
$object->users = array_map(function (array $user) { $object->users = array_map(function (array $user) {

View file

@ -39,9 +39,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @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 = new self();
$object->start_date = $data['start_date']; $object->start_date = $data['start_date'];

View file

@ -23,9 +23,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return VideoChatStarted
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
return new self(); return new self();
} }

View file

@ -118,9 +118,9 @@
* Constructs the object from an array representation * Constructs the object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return VideoNote
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -105,9 +105,9 @@
* Constructs object from an array representation * Constructs object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return Voice
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -54,9 +54,9 @@
* Constructs the object from an array representation. * Constructs the object from an array representation.
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return WebAppData
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
$object = new self(); $object = new self();

View file

@ -38,9 +38,9 @@
* Constructs the object from an array representation. * Constructs the object from an array representation.
* *
* @param array $data * @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 = new self();
$object->url = $data['url']; $object->url = $data['url'];

View file

@ -23,9 +23,9 @@
* Convert object from an array representation * Convert object from an array representation
* *
* @param array $data * @param array $data
* @return ObjectTypeInterface * @return WriteAccessAllowed
*/ */
public static function fromArray(array $data): ObjectTypeInterface public static function fromArray(array $data): self
{ {
return new self(); return new self();
} }