Moved Types to their own namespace

This commit is contained in:
netkas 2024-09-29 21:49:10 -04:00
parent 2f701a899f
commit 55e65e8948
35 changed files with 36 additions and 35 deletions

View file

@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
* Refactor enums to use native PHP 8.1 syntax * Refactor enums to use native PHP 8.1 syntax
* Moved Types to their own namespace
## [6.7.0] - 2023-08-10 ## [6.7.0] - 2023-08-10

View file

@ -9,8 +9,8 @@
use InvalidArgumentException; use InvalidArgumentException;
use LogLib\Log; use LogLib\Log;
use TempFile\TempFile; use TempFile\TempFile;
use TgBotLib\Enums\ChatMemberStatus; use TgBotLib\Enums\Types\ChatMemberStatus;
use TgBotLib\Enums\EventType; use TgBotLib\Enums\Types\EventType;
use TgBotLib\Exceptions\TelegramException; use TgBotLib\Exceptions\TelegramException;
use TgBotLib\Interfaces\CommandInterface; use TgBotLib\Interfaces\CommandInterface;
use TgBotLib\Interfaces\EventInterface; use TgBotLib\Interfaces\EventInterface;

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum BotCommandScopeType : string enum BotCommandScopeType : string
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum ChatActionType : string enum ChatActionType : string
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum ChatMemberStatus : string enum ChatMemberStatus : string
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum ChatType : string enum ChatType : string
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum EventType : string enum EventType : string
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum InlineQueryResultType : string enum InlineQueryResultType : string
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum InputMediaType : string enum InputMediaType : string
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum MenuButtonType : string enum MenuButtonType : string
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum MessageEntityType : string enum MessageEntityType : string
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum PassportElementType : string enum PassportElementType : string
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum PollType : string enum PollType : string
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum StickerFormat : string enum StickerFormat : string
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum StickerType : string enum StickerType : string
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum ThumbnailMimeType : string enum ThumbnailMimeType : string
{ {

View file

@ -1,6 +1,6 @@
<?php <?php
namespace TgBotLib\Enums; namespace TgBotLib\Enums\Types;
enum UpdateEventType : string enum UpdateEventType : string
{ {

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram\BotCommandScope; namespace TgBotLib\Objects\Telegram\BotCommandScope;
use TgBotLib\Enums\BotCommandScopeType; use TgBotLib\Enums\Types\BotCommandScopeType;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\BotCommandScope; use TgBotLib\Objects\Telegram\BotCommandScope;

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram\BotCommandScope; namespace TgBotLib\Objects\Telegram\BotCommandScope;
use TgBotLib\Enums\BotCommandScopeType; use TgBotLib\Enums\Types\BotCommandScopeType;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\BotCommandScope; use TgBotLib\Objects\Telegram\BotCommandScope;

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram\BotCommandScope; namespace TgBotLib\Objects\Telegram\BotCommandScope;
use TgBotLib\Enums\BotCommandScopeType; use TgBotLib\Enums\Types\BotCommandScopeType;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\BotCommandScope; use TgBotLib\Objects\Telegram\BotCommandScope;

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram\BotCommandScope; namespace TgBotLib\Objects\Telegram\BotCommandScope;
use TgBotLib\Enums\BotCommandScopeType; use TgBotLib\Enums\Types\BotCommandScopeType;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\BotCommandScope; use TgBotLib\Objects\Telegram\BotCommandScope;

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram\BotCommandScope; namespace TgBotLib\Objects\Telegram\BotCommandScope;
use TgBotLib\Enums\BotCommandScopeType; use TgBotLib\Enums\Types\BotCommandScopeType;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\BotCommandScope; use TgBotLib\Objects\Telegram\BotCommandScope;

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram\BotCommandScope; namespace TgBotLib\Objects\Telegram\BotCommandScope;
use TgBotLib\Enums\BotCommandScopeType; use TgBotLib\Enums\Types\BotCommandScopeType;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\BotCommandScope; use TgBotLib\Objects\Telegram\BotCommandScope;

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram\BotCommandScope; namespace TgBotLib\Objects\Telegram\BotCommandScope;
use TgBotLib\Enums\BotCommandScopeType; use TgBotLib\Enums\Types\BotCommandScopeType;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\BotCommandScope; use TgBotLib\Objects\Telegram\BotCommandScope;

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram; namespace TgBotLib\Objects\Telegram;
use TgBotLib\Enums\ChatType; use TgBotLib\Enums\Types\ChatType;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
class Chat implements ObjectTypeInterface class Chat implements ObjectTypeInterface

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram\ChatMember; namespace TgBotLib\Objects\Telegram\ChatMember;
use TgBotLib\Enums\ChatMemberStatus; use TgBotLib\Enums\Types\ChatMemberStatus;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\ChatMember; use TgBotLib\Objects\Telegram\ChatMember;
use TgBotLib\Objects\Telegram\User; use TgBotLib\Objects\Telegram\User;

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram\ChatMember; namespace TgBotLib\Objects\Telegram\ChatMember;
use TgBotLib\Enums\ChatMemberStatus; use TgBotLib\Enums\Types\ChatMemberStatus;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\ChatMember; use TgBotLib\Objects\Telegram\ChatMember;
use TgBotLib\Objects\Telegram\User; use TgBotLib\Objects\Telegram\User;

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram\ChatMember; namespace TgBotLib\Objects\Telegram\ChatMember;
use TgBotLib\Enums\ChatMemberStatus; use TgBotLib\Enums\Types\ChatMemberStatus;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\ChatMember; use TgBotLib\Objects\Telegram\ChatMember;
use TgBotLib\Objects\Telegram\User; use TgBotLib\Objects\Telegram\User;

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram\ChatMember; namespace TgBotLib\Objects\Telegram\ChatMember;
use TgBotLib\Enums\ChatMemberStatus; use TgBotLib\Enums\Types\ChatMemberStatus;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\ChatMember; use TgBotLib\Objects\Telegram\ChatMember;
use TgBotLib\Objects\Telegram\User; use TgBotLib\Objects\Telegram\User;

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram\ChatMember; namespace TgBotLib\Objects\Telegram\ChatMember;
use TgBotLib\Enums\ChatMemberStatus; use TgBotLib\Enums\Types\ChatMemberStatus;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\ChatMember; use TgBotLib\Objects\Telegram\ChatMember;
use TgBotLib\Objects\Telegram\User; use TgBotLib\Objects\Telegram\User;

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram\ChatMember; namespace TgBotLib\Objects\Telegram\ChatMember;
use TgBotLib\Enums\ChatMemberStatus; use TgBotLib\Enums\Types\ChatMemberStatus;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\ChatMember; use TgBotLib\Objects\Telegram\ChatMember;
use TgBotLib\Objects\Telegram\User; use TgBotLib\Objects\Telegram\User;

View file

@ -3,7 +3,7 @@
namespace TgBotLib\Objects\Telegram; namespace TgBotLib\Objects\Telegram;
use InvalidArgumentException; use InvalidArgumentException;
use TgBotLib\Enums\InlineQueryResultType; use TgBotLib\Enums\Types\InlineQueryResultType;
use TgBotLib\Exceptions\NotImplementedException; use TgBotLib\Exceptions\NotImplementedException;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultArticle; use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultArticle;

View file

@ -6,8 +6,8 @@
namespace TgBotLib\Objects\Telegram\InlineQueryResult; namespace TgBotLib\Objects\Telegram\InlineQueryResult;
use InvalidArgumentException; use InvalidArgumentException;
use TgBotLib\Enums\ThumbnailMimeType;
use TgBotLib\Classes\Validate; use TgBotLib\Classes\Validate;
use TgBotLib\Enums\Types\ThumbnailMimeType;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\InlineKeyboardMarkup; use TgBotLib\Objects\Telegram\InlineKeyboardMarkup;
use TgBotLib\Objects\Telegram\InputMessageContent\InputContactMessageContent; use TgBotLib\Objects\Telegram\InputMessageContent\InputContactMessageContent;

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram\InputMedia; namespace TgBotLib\Objects\Telegram\InputMedia;
use TgBotLib\Enums\InputMediaType; use TgBotLib\Enums\Types\InputMediaType;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
use TgBotLib\Objects\Telegram\InputMedia; use TgBotLib\Objects\Telegram\InputMedia;
use TgBotLib\Objects\Telegram\MessageEntity; use TgBotLib\Objects\Telegram\MessageEntity;

View file

@ -4,7 +4,7 @@
namespace TgBotLib\Objects\Telegram; namespace TgBotLib\Objects\Telegram;
use TgBotLib\Enums\StickerType; use TgBotLib\Enums\Types\StickerType;
use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Interfaces\ObjectTypeInterface;
class StickerSet implements ObjectTypeInterface class StickerSet implements ObjectTypeInterface