mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
added some callable prototypes for phpstan
This commit is contained in:
@@ -499,6 +499,7 @@ class PluginManager{
|
||||
}
|
||||
}
|
||||
|
||||
/** @phpstan-var \ReflectionClass<Event> $eventClass */
|
||||
$this->registerEvent($eventClass->getName(), $handlerClosure, $priority, $plugin, $handleCancelled);
|
||||
}
|
||||
}
|
||||
@@ -507,6 +508,10 @@ class PluginManager{
|
||||
/**
|
||||
* @param string $event Class name that extends Event
|
||||
*
|
||||
* @phpstan-template TEvent of Event
|
||||
* @phpstan-param class-string<TEvent> $event
|
||||
* @phpstan-param \Closure(TEvent) : void $handler
|
||||
*
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public function registerEvent(string $event, \Closure $handler, int $priority, Plugin $plugin, bool $handleCancelled = false) : void{
|
||||
|
Reference in New Issue
Block a user