Moved Types to their own namespace
This commit is contained in:
parent
2f701a899f
commit
55e65e8948
35 changed files with 36 additions and 35 deletions
|
@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Changed
|
||||
* Refactor enums to use native PHP 8.1 syntax
|
||||
* Moved Types to their own namespace
|
||||
|
||||
|
||||
## [6.7.0] - 2023-08-10
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
use InvalidArgumentException;
|
||||
use LogLib\Log;
|
||||
use TempFile\TempFile;
|
||||
use TgBotLib\Enums\ChatMemberStatus;
|
||||
use TgBotLib\Enums\EventType;
|
||||
use TgBotLib\Enums\Types\ChatMemberStatus;
|
||||
use TgBotLib\Enums\Types\EventType;
|
||||
use TgBotLib\Exceptions\TelegramException;
|
||||
use TgBotLib\Interfaces\CommandInterface;
|
||||
use TgBotLib\Interfaces\EventInterface;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum BotCommandScopeType : string
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum ChatActionType : string
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum ChatMemberStatus : string
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum ChatType : string
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum EventType : string
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum InlineQueryResultType : string
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum InputMediaType : string
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum MenuButtonType : string
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum MessageEntityType : string
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum PassportElementType : string
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum PollType : string
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum StickerFormat : string
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum StickerType : string
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum ThumbnailMimeType : string
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Enums;
|
||||
namespace TgBotLib\Enums\Types;
|
||||
|
||||
enum UpdateEventType : string
|
||||
{
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
||||
|
||||
use TgBotLib\Enums\BotCommandScopeType;
|
||||
use TgBotLib\Enums\Types\BotCommandScopeType;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\BotCommandScope;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
||||
|
||||
use TgBotLib\Enums\BotCommandScopeType;
|
||||
use TgBotLib\Enums\Types\BotCommandScopeType;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\BotCommandScope;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
||||
|
||||
use TgBotLib\Enums\BotCommandScopeType;
|
||||
use TgBotLib\Enums\Types\BotCommandScopeType;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\BotCommandScope;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
||||
|
||||
use TgBotLib\Enums\BotCommandScopeType;
|
||||
use TgBotLib\Enums\Types\BotCommandScopeType;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\BotCommandScope;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
||||
|
||||
use TgBotLib\Enums\BotCommandScopeType;
|
||||
use TgBotLib\Enums\Types\BotCommandScopeType;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\BotCommandScope;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
||||
|
||||
use TgBotLib\Enums\BotCommandScopeType;
|
||||
use TgBotLib\Enums\Types\BotCommandScopeType;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\BotCommandScope;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
||||
|
||||
use TgBotLib\Enums\BotCommandScopeType;
|
||||
use TgBotLib\Enums\Types\BotCommandScopeType;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\BotCommandScope;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram;
|
||||
|
||||
use TgBotLib\Enums\ChatType;
|
||||
use TgBotLib\Enums\Types\ChatType;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
|
||||
class Chat implements ObjectTypeInterface
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram\ChatMember;
|
||||
|
||||
use TgBotLib\Enums\ChatMemberStatus;
|
||||
use TgBotLib\Enums\Types\ChatMemberStatus;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\ChatMember;
|
||||
use TgBotLib\Objects\Telegram\User;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram\ChatMember;
|
||||
|
||||
use TgBotLib\Enums\ChatMemberStatus;
|
||||
use TgBotLib\Enums\Types\ChatMemberStatus;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\ChatMember;
|
||||
use TgBotLib\Objects\Telegram\User;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram\ChatMember;
|
||||
|
||||
use TgBotLib\Enums\ChatMemberStatus;
|
||||
use TgBotLib\Enums\Types\ChatMemberStatus;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\ChatMember;
|
||||
use TgBotLib\Objects\Telegram\User;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram\ChatMember;
|
||||
|
||||
use TgBotLib\Enums\ChatMemberStatus;
|
||||
use TgBotLib\Enums\Types\ChatMemberStatus;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\ChatMember;
|
||||
use TgBotLib\Objects\Telegram\User;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram\ChatMember;
|
||||
|
||||
use TgBotLib\Enums\ChatMemberStatus;
|
||||
use TgBotLib\Enums\Types\ChatMemberStatus;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\ChatMember;
|
||||
use TgBotLib\Objects\Telegram\User;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram\ChatMember;
|
||||
|
||||
use TgBotLib\Enums\ChatMemberStatus;
|
||||
use TgBotLib\Enums\Types\ChatMemberStatus;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\ChatMember;
|
||||
use TgBotLib\Objects\Telegram\User;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace TgBotLib\Objects\Telegram;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use TgBotLib\Enums\InlineQueryResultType;
|
||||
use TgBotLib\Enums\Types\InlineQueryResultType;
|
||||
use TgBotLib\Exceptions\NotImplementedException;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultArticle;
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
namespace TgBotLib\Objects\Telegram\InlineQueryResult;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use TgBotLib\Enums\ThumbnailMimeType;
|
||||
use TgBotLib\Classes\Validate;
|
||||
use TgBotLib\Enums\Types\ThumbnailMimeType;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\InlineKeyboardMarkup;
|
||||
use TgBotLib\Objects\Telegram\InputMessageContent\InputContactMessageContent;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram\InputMedia;
|
||||
|
||||
use TgBotLib\Enums\InputMediaType;
|
||||
use TgBotLib\Enums\Types\InputMediaType;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\Telegram\InputMedia;
|
||||
use TgBotLib\Objects\Telegram\MessageEntity;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace TgBotLib\Objects\Telegram;
|
||||
|
||||
use TgBotLib\Enums\StickerType;
|
||||
use TgBotLib\Enums\Types\StickerType;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
|
||||
class StickerSet implements ObjectTypeInterface
|
||||
|
|
Loading…
Add table
Reference in a new issue