Skip to content

Commit

Permalink
No ArrayShape or array annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
TiiFuchs committed Apr 27, 2022
1 parent 92310fc commit 17a6f09
Show file tree
Hide file tree
Showing 130 changed files with 1,440 additions and 797 deletions.
23 changes: 14 additions & 9 deletions src/Telegram/Animation.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,27 @@

class Animation extends \Tii\Telepath\Type
{
public readonly string $file_id;
public string $file_id;

public readonly string $file_unique_id;
public string $file_unique_id;

public readonly int $width;
public int $width;

public readonly int $height;
public int $height;

public readonly int $duration;
public int $duration;

public readonly PhotoSize $thumb;
public PhotoSize $thumb;

public readonly string $file_name;
public string $file_name;

public readonly string $mime_type;
public string $mime_type;

public readonly int $file_size;
public int $file_size;

public function __construct(array $data = [])
{
parent::__construct($data);
}
}

23 changes: 14 additions & 9 deletions src/Telegram/Audio.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,27 @@

class Audio extends \Tii\Telepath\Type
{
public readonly string $file_id;
public string $file_id;

public readonly string $file_unique_id;
public string $file_unique_id;

public readonly int $duration;
public int $duration;

public readonly string $performer;
public string $performer;

public readonly string $title;
public string $title;

public readonly string $file_name;
public string $file_name;

public readonly string $mime_type;
public string $mime_type;

public readonly int $file_size;
public int $file_size;

public readonly PhotoSize $thumb;
public PhotoSize $thumb;

public function __construct(array $data = [])
{
parent::__construct($data);
}
}

9 changes: 7 additions & 2 deletions src/Telegram/BotCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@

class BotCommand extends \Tii\Telepath\Type
{
public readonly string $command;
public string $command;

public readonly string $description;
public string $description;

public function __construct(array $data = [])
{
parent::__construct($data);
}
}

4 changes: 4 additions & 0 deletions src/Telegram/BotCommandScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@

class BotCommandScope extends \Tii\Telepath\Type
{
public function __construct(array $data = [])
{
parent::__construct($data);
}
}

7 changes: 6 additions & 1 deletion src/Telegram/BotCommandScopeAllChatAdministrators.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

class BotCommandScopeAllChatAdministrators extends BotCommandScope
{
public readonly string $type;
public string $type;

public function __construct(array $data = [])
{
parent::__construct($data);
}
}

7 changes: 6 additions & 1 deletion src/Telegram/BotCommandScopeAllGroupChats.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

class BotCommandScopeAllGroupChats extends BotCommandScope
{
public readonly string $type;
public string $type;

public function __construct(array $data = [])
{
parent::__construct($data);
}
}

7 changes: 6 additions & 1 deletion src/Telegram/BotCommandScopeAllPrivateChats.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

class BotCommandScopeAllPrivateChats extends BotCommandScope
{
public readonly string $type;
public string $type;

public function __construct(array $data = [])
{
parent::__construct($data);
}
}

9 changes: 7 additions & 2 deletions src/Telegram/BotCommandScopeChat.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@

class BotCommandScopeChat extends BotCommandScope
{
public readonly string $type;
public string $type;

/**
* @var Integer or String
*/
public readonly int|string $chat_id;
public int|string $chat_id;

public function __construct(array $data = [])
{
parent::__construct($data);
}
}

9 changes: 7 additions & 2 deletions src/Telegram/BotCommandScopeChatAdministrators.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@

class BotCommandScopeChatAdministrators extends BotCommandScope
{
public readonly string $type;
public string $type;

/**
* @var Integer or String
*/
public readonly int|string $chat_id;
public int|string $chat_id;

public function __construct(array $data = [])
{
parent::__construct($data);
}
}

11 changes: 8 additions & 3 deletions src/Telegram/BotCommandScopeChatMember.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@

class BotCommandScopeChatMember extends BotCommandScope
{
public readonly string $type;
public string $type;

/**
* @var Integer or String
*/
public readonly int|string $chat_id;
public int|string $chat_id;

public readonly int $user_id;
public int $user_id;

public function __construct(array $data = [])
{
parent::__construct($data);
}
}

7 changes: 6 additions & 1 deletion src/Telegram/BotCommandScopeDefault.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

class BotCommandScopeDefault extends BotCommandScope
{
public readonly string $type;
public string $type;

public function __construct(array $data = [])
{
parent::__construct($data);
}
}

19 changes: 12 additions & 7 deletions src/Telegram/CallbackQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,23 @@

class CallbackQuery extends \Tii\Telepath\Type
{
public readonly string $id;
public string $id;

public readonly User $from;
public User $from;

public readonly Message $message;
public Message $message;

public readonly string $inline_message_id;
public string $inline_message_id;

public readonly string $chat_instance;
public string $chat_instance;

public readonly string $data;
public string $data;

public readonly string $game_short_name;
public string $game_short_name;

public function __construct(array $data = [])
{
parent::__construct($data);
}
}

45 changes: 25 additions & 20 deletions src/Telegram/Chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,49 @@

class Chat extends \Tii\Telepath\Type
{
public readonly int $id;
public int $id;

public readonly string $type;
public string $type;

public readonly string $title;
public string $title;

public readonly string $username;
public string $username;

public readonly string $first_name;
public string $first_name;

public readonly string $last_name;
public string $last_name;

public readonly ChatPhoto $photo;
public ChatPhoto $photo;

public readonly string $bio;
public string $bio;

public readonly bool $has_private_forwards;
public bool $has_private_forwards;

public readonly string $description;
public string $description;

public readonly string $invite_link;
public string $invite_link;

public readonly Message $pinned_message;
public Message $pinned_message;

public readonly ChatPermissions $permissions;
public ChatPermissions $permissions;

public readonly int $slow_mode_delay;
public int $slow_mode_delay;

public readonly int $message_auto_delete_time;
public int $message_auto_delete_time;

public readonly bool $has_protected_content;
public bool $has_protected_content;

public readonly string $sticker_set_name;
public string $sticker_set_name;

public readonly bool $can_set_sticker_set;
public bool $can_set_sticker_set;

public readonly int $linked_chat_id;
public int $linked_chat_id;

public readonly ChatLocation $location;
public ChatLocation $location;

public function __construct(array $data = [])
{
parent::__construct($data);
}
}

27 changes: 16 additions & 11 deletions src/Telegram/ChatAdministratorRights.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,31 @@

class ChatAdministratorRights extends \Tii\Telepath\Type
{
public readonly bool $is_anonymous;
public bool $is_anonymous;

public readonly bool $can_manage_chat;
public bool $can_manage_chat;

public readonly bool $can_delete_messages;
public bool $can_delete_messages;

public readonly bool $can_manage_video_chats;
public bool $can_manage_video_chats;

public readonly bool $can_restrict_members;
public bool $can_restrict_members;

public readonly bool $can_promote_members;
public bool $can_promote_members;

public readonly bool $can_change_info;
public bool $can_change_info;

public readonly bool $can_invite_users;
public bool $can_invite_users;

public readonly bool $can_post_messages;
public bool $can_post_messages;

public readonly bool $can_edit_messages;
public bool $can_edit_messages;

public readonly bool $can_pin_messages;
public bool $can_pin_messages;

public function __construct(array $data = [])
{
parent::__construct($data);
}
}

23 changes: 14 additions & 9 deletions src/Telegram/ChatInviteLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,27 @@

class ChatInviteLink extends \Tii\Telepath\Type
{
public readonly string $invite_link;
public string $invite_link;

public readonly User $creator;
public User $creator;

public readonly bool $creates_join_request;
public bool $creates_join_request;

public readonly bool $is_primary;
public bool $is_primary;

public readonly bool $is_revoked;
public bool $is_revoked;

public readonly string $name;
public string $name;

public readonly int $expire_date;
public int $expire_date;

public readonly int $member_limit;
public int $member_limit;

public readonly int $pending_join_request_count;
public int $pending_join_request_count;

public function __construct(array $data = [])
{
parent::__construct($data);
}
}

Loading

0 comments on commit 17a6f09

Please sign in to comment.