From 22271886404b16aaad7d10314b7b722117d13b06 Mon Sep 17 00:00:00 2001 From: ShockedPlot7560 Date: Mon, 31 Jul 2023 18:29:47 +0200 Subject: [PATCH] fix phpstan typehit --- composer.json | 3 ++- src/PromiseInterface.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index bde4748..47c8685 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,8 @@ }, "require-dev": { "phpunit/phpunit": "^9.5 || ^7.5", - "pocketmine/pocketmine-mp": "^4.0 || ^5.0" + "pocketmine/pocketmine-mp": "^4.0 || ^5.0", + "phpstan/phpstan": "^1.10" }, "autoload": { "psr-4": { diff --git a/src/PromiseInterface.php b/src/PromiseInterface.php index 008ba6a..f47c77c 100644 --- a/src/PromiseInterface.php +++ b/src/PromiseInterface.php @@ -40,7 +40,7 @@ interface PromiseInterface * @phpstan-param null|callable(PromiseResult): ClosureResult $onFulfilled * @phpstan-param null|callable(PromiseError): mixed $onRejected * - * @phpstan-return PromiseInterface + * @phpstan-return PromiseInterface */ public function then(?callable $onFulfilled = null, ?callable $onRejected = null): PromiseInterface;