Rename EventType to UpdateEventType for clarity
This commit is contained in:
parent
b8b1a87639
commit
73d14179b1
9 changed files with 31 additions and 31 deletions
|
@ -14,7 +14,7 @@
|
|||
use TgBotLib\Abstracts\Method;
|
||||
use TgBotLib\Abstracts\UpdateEvent;
|
||||
use TgBotLib\Classes\Logger;
|
||||
use TgBotLib\Enums\EventType;
|
||||
use TgBotLib\Enums\UpdateEventType;
|
||||
use TgBotLib\Enums\Methods;
|
||||
use TgBotLib\Enums\Types\ChatActionType;
|
||||
use TgBotLib\Enums\Types\ParseMode;
|
||||
|
@ -271,10 +271,10 @@
|
|||
/**
|
||||
* Retrieves all event handlers that match a specified event type.
|
||||
*
|
||||
* @param EventType $type The event type to filter handlers by.
|
||||
* @param UpdateEventType $type The event type to filter handlers by.
|
||||
* @return array An array of event handlers that handle the specified event type.
|
||||
*/
|
||||
public function getEventHandlersByType(EventType $type): array
|
||||
public function getEventHandlersByType(UpdateEventType $type): array
|
||||
{
|
||||
$results = [];
|
||||
/** @var UpdateEvent $eventHandler */
|
||||
|
@ -302,10 +302,10 @@
|
|||
/**
|
||||
* Removes all event handlers of a specified type.
|
||||
*
|
||||
* @param EventType $type The event type to filter handlers by.
|
||||
* @param UpdateEventType $type The event type to filter handlers by.
|
||||
* @return void
|
||||
*/
|
||||
public function removeEventHandlersByType(EventType $type): void
|
||||
public function removeEventHandlersByType(UpdateEventType $type): void
|
||||
{
|
||||
$this->eventHandlers = array_filter($this->eventHandlers, function($eventHandler) use ($type)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue