mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 13:35:29 +00:00
ah hello my old friend, impossible-generics.neon
propagating generics all the way through the likes of HandlerList etc is more trouble than it's worth.
This commit is contained in:
parent
32b1d6c0c2
commit
fa796535ff
@ -29,9 +29,6 @@ use pocketmine\timings\TimingsHandler;
|
|||||||
use function in_array;
|
use function in_array;
|
||||||
|
|
||||||
class AsyncRegisteredListener{
|
class AsyncRegisteredListener{
|
||||||
/**
|
|
||||||
* @phpstan-param \Closure(AsyncEvent) : ?Promise<null> $handler
|
|
||||||
*/
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private \Closure $handler,
|
private \Closure $handler,
|
||||||
private int $priority,
|
private int $priority,
|
||||||
|
@ -1,5 +1,15 @@
|
|||||||
parameters:
|
parameters:
|
||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
|
-
|
||||||
|
message: "#^Method pocketmine\\\\event\\\\AsyncRegisteredListener\\:\\:__construct\\(\\) has parameter \\$handler with no signature specified for Closure\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: ../../../src/event/AsyncRegisteredListener.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Method pocketmine\\\\event\\\\AsyncRegisteredListener\\:\\:getHandler\\(\\) return type has no signature specified for Closure\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: ../../../src/event/AsyncRegisteredListener.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Method pocketmine\\\\event\\\\RegisteredListener\\:\\:__construct\\(\\) has parameter \\$handler with no signature specified for Closure\\.$#"
|
message: "#^Method pocketmine\\\\event\\\\RegisteredListener\\:\\:__construct\\(\\) has parameter \\$handler with no signature specified for Closure\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -39,6 +39,9 @@ final class AsyncEventInheritanceTest extends Test{
|
|||||||
ChildAsyncEvent::class,
|
ChildAsyncEvent::class,
|
||||||
ParentAsyncEvent::class
|
ParentAsyncEvent::class
|
||||||
];
|
];
|
||||||
|
/**
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
private array $callOrder = [];
|
private array $callOrder = [];
|
||||||
|
|
||||||
public function getName() : string{
|
public function getName() : string{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user