Changed return types
This commit is contained in:
parent
0fe5f5735a
commit
69c025af05
99 changed files with 206 additions and 202 deletions
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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']))
|
||||||
{
|
{
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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'];
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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'];
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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']);
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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'];
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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'];
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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'];
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue