Rename UpdateEventType to EventType for consistency

This commit is contained in:
netkas 2024-11-03 18:25:42 -05:00
parent a24c617c9f
commit 7623f488ee
28 changed files with 110 additions and 110 deletions

View file

@ -3,7 +3,7 @@
namespace TgBotLib\Events;
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\BusinessConnection;
abstract class BusinessConnectionEvent extends UpdateEvent
@ -11,9 +11,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::BUSINESS_CONNECTION;
return EventType::BUSINESS_CONNECTION;
}
/**

View file

@ -4,7 +4,7 @@
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\Message;
abstract class BusinessMessageEvent extends UpdateEvent
@ -12,9 +12,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::BUSINESS_MESSAGE;
return EventType::BUSINESS_MESSAGE;
}
/**

View file

@ -3,7 +3,7 @@
namespace TgBotLib\Events;
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\CallbackQuery;
abstract class CallbackQueryEvent extends UpdateEvent
@ -11,9 +11,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::CALLBACK_QUERY;
return EventType::CALLBACK_QUERY;
}
/**

View file

@ -4,7 +4,7 @@
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\Message;
abstract class ChannelPostEvent extends UpdateEvent
@ -12,9 +12,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::CHANNEL_POST;
return EventType::CHANNEL_POST;
}
/**

View file

@ -3,7 +3,7 @@
namespace TgBotLib\Events;
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\ChatBoostUpdated;
abstract class ChatBoostEvent extends UpdateEvent
@ -11,9 +11,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::CHAT_BOOST_EVENT;
return EventType::CHAT_BOOST_EVENT;
}
/**

View file

@ -4,7 +4,7 @@
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\ChatJoinRequest;
abstract class ChatJoinRequestEvent extends UpdateEvent
@ -12,9 +12,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::CHAT_JOIN_REQUEST_EVENT;
return EventType::CHAT_JOIN_REQUEST_EVENT;
}
/**

View file

@ -4,7 +4,7 @@
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\ChatMemberUpdated;
abstract class ChatMemberUpdatedEvent extends UpdateEvent
@ -12,9 +12,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::CHAT_MEMBER_UPDATED;
return EventType::CHAT_MEMBER_UPDATED;
}
/**

View file

@ -4,7 +4,7 @@
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\Inline\ChosenInlineResult;
abstract class ChosenInlineResultEvent extends UpdateEvent
@ -12,9 +12,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateeventType::CHOSEN_INLINE_RESULT;
return EventType::CHOSEN_INLINE_RESULT;
}
/**

View file

@ -4,7 +4,7 @@
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\BusinessMessagesDeleted;
abstract class DeletedBusinessMessagesEvent extends UpdateEvent
@ -12,9 +12,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::DELETED_BUSINESS_MESSAGES;
return EventType::DELETED_BUSINESS_MESSAGES;
}
/**

View file

@ -3,7 +3,7 @@
namespace TgBotLib\Events;
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\Message;
abstract class EditedBusinessMessageEvent extends UpdateEvent
@ -11,9 +11,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::EDITED_BUSINESS_MESSAGE;
return EventType::EDITED_BUSINESS_MESSAGE;
}
/**

View file

@ -3,7 +3,7 @@
namespace TgBotLib\Events;
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\Message;
abstract class EditedChannelPostEvent extends UpdateEvent
@ -11,9 +11,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::EDITED_CHANNEL_POST;
return EventType::EDITED_CHANNEL_POST;
}
/**

View file

@ -3,7 +3,7 @@
namespace TgBotLib\Events;
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\Message;
abstract class EditedMessageEvent extends UpdateEvent
@ -11,9 +11,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::EDITED_MESSAGE;
return EventType::EDITED_MESSAGE;
}
/**

View file

@ -4,7 +4,7 @@
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\Inline\InlineQuery;
abstract class InlineQueryEvent extends UpdateEvent
@ -12,9 +12,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::INLINE_QUERY;
return EventType::INLINE_QUERY;
}
/**C

View file

@ -3,7 +3,7 @@
namespace TgBotLib\Events;
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\Message;
abstract class MessageEvent extends UpdateEvent
@ -11,9 +11,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::MESSAGE;
return EventType::MESSAGE;
}
/**

View file

@ -4,7 +4,7 @@
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\MessageReactionCountUpdated;
abstract class MessageReactionCountEvent extends UpdateEvent
@ -12,9 +12,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::MESSAGE_REACTION_COUNT;
return EventType::MESSAGE_REACTION_COUNT;
}
/**

View file

@ -4,7 +4,7 @@
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\MessageReactionUpdated;
abstract class MessageReactionEvent extends UpdateEvent
@ -12,9 +12,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::MESSAGE_REACTION;
return EventType::MESSAGE_REACTION;
}
/**

View file

@ -4,7 +4,7 @@
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\ChatMemberUpdated;
abstract class MyChatMemberUpdatedEvent extends UpdateEvent
@ -12,9 +12,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::MY_CHAT_MEMBER_UPDATED;
return EventType::MY_CHAT_MEMBER_UPDATED;
}
/**

View file

@ -3,7 +3,7 @@
namespace TgBotLib\Events;
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\Payments\PaidMediaPurchased;
abstract class PaidMediaPurchasedEvent extends UpdateEvent
@ -11,9 +11,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::PAID_MEDIA_PURCHASED;
return EventType::PAID_MEDIA_PURCHASED;
}
/**

View file

@ -4,7 +4,7 @@
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\PollAnswer;
abstract class PollAnswerEvent extends UpdateEvent
@ -12,9 +12,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::POLL_ANSWER;
return EventType::POLL_ANSWER;
}
/**

View file

@ -4,7 +4,7 @@
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\Poll;
abstract class PollEvent extends UpdateEvent
@ -12,9 +12,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::POLL;
return EventType::POLL;
}
/**

View file

@ -4,7 +4,7 @@
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\Payments\PreCheckoutQuery;
abstract class PreCheckoutQueryEvent extends UpdateEvent
@ -12,9 +12,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::PRE_CHECKOUT_QUERY;
return EventType::PRE_CHECKOUT_QUERY;
}
/**

View file

@ -3,7 +3,7 @@
namespace TgBotLib\Events;
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\ChatBoostRemoved;
abstract class RemovedChatBoostEvent extends UpdateEvent
@ -11,9 +11,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::REMOVED_CHAT_BOOST_EVENT;
return EventType::REMOVED_CHAT_BOOST_EVENT;
}
/**

View file

@ -4,7 +4,7 @@
use TgBotLib\Abstracts\UpdateEvent;
use TgBotLib\Bot;
use TgBotLib\Enums\UpdateEventType;
use TgBotLib\Enums\EventType;
use TgBotLib\Objects\Payments\ShippingQuery;
abstract class ShippingQueryEvent extends UpdateEvent
@ -12,9 +12,9 @@
/**
* @inheritDoc
*/
public static function getEventType(): UpdateEventType
public static function getEventType(): EventType
{
return UpdateEventType::SHIPPING_QUERY;
return EventType::SHIPPING_QUERY;
}
/**