mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 13:25:16 +00:00
Modernize single-use phpstan-template tags
This commit is contained in:
parent
8dc28b7ea8
commit
80125f9b19
@ -37,8 +37,7 @@ class HandlerList{
|
|||||||
private array $affectedHandlerCaches = [];
|
private array $affectedHandlerCaches = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @phpstan-template TEvent of Event
|
* @phpstan-param class-string<covariant Event> $class
|
||||||
* @phpstan-param class-string<TEvent> $class
|
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private string $class,
|
private string $class,
|
||||||
|
@ -86,8 +86,7 @@ class HandlerListManager{
|
|||||||
*
|
*
|
||||||
* Calling this method also lazily initializes the $classMap inheritance tree of handler lists.
|
* Calling this method also lazily initializes the $classMap inheritance tree of handler lists.
|
||||||
*
|
*
|
||||||
* @phpstan-template TEvent of Event
|
* @phpstan-param class-string<covariant Event> $event
|
||||||
* @phpstan-param class-string<TEvent> $event
|
|
||||||
*
|
*
|
||||||
* @throws \ReflectionException
|
* @throws \ReflectionException
|
||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
@ -113,8 +112,7 @@ class HandlerListManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @phpstan-template TEvent of Event
|
* @phpstan-param class-string<covariant Event> $event
|
||||||
* @phpstan-param class-string<TEvent> $event
|
|
||||||
*
|
*
|
||||||
* @return RegisteredListener[]
|
* @return RegisteredListener[]
|
||||||
*/
|
*/
|
||||||
|
@ -210,8 +210,7 @@ abstract class Timings{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @phpstan-template T of object
|
* @phpstan-param class-string<covariant object> $class
|
||||||
* @phpstan-param class-string<T> $class
|
|
||||||
*/
|
*/
|
||||||
private static function shortenCoreClassName(string $class, string $prefix) : string{
|
private static function shortenCoreClassName(string $class, string $prefix) : string{
|
||||||
if(str_starts_with($class, $prefix)){
|
if(str_starts_with($class, $prefix)){
|
||||||
@ -302,8 +301,7 @@ abstract class Timings{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @phpstan-template TEvent of Event
|
* @phpstan-param class-string<covariant Event> $event
|
||||||
* @phpstan-param class-string<TEvent> $event
|
|
||||||
*/
|
*/
|
||||||
public static function getEventHandlerTimings(string $event, string $handlerName, string $group) : TimingsHandler{
|
public static function getEventHandlerTimings(string $event, string $handlerName, string $group) : TimingsHandler{
|
||||||
if(!isset(self::$eventHandlers[$event][$handlerName])){
|
if(!isset(self::$eventHandlers[$event][$handlerName])){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user