From 640df1003c0e85996fb8de247c269a9ac6a870c6 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 29 Jan 2020 16:38:50 +0000 Subject: [PATCH] add some Generator generics for PHPStan --- src/pocketmine/inventory/CraftingManager.php | 1 + src/pocketmine/network/mcpe/protocol/BatchPacket.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/pocketmine/inventory/CraftingManager.php b/src/pocketmine/inventory/CraftingManager.php index 6be2a5ce9..4691c792d 100644 --- a/src/pocketmine/inventory/CraftingManager.php +++ b/src/pocketmine/inventory/CraftingManager.php @@ -254,6 +254,7 @@ class CraftingManager{ * @param Item[] $outputs * * @return CraftingRecipe[]|\Generator + * @phpstan-return \Generator */ public function matchRecipeByOutputs(array $outputs) : \Generator{ //TODO: try to match special recipes before anything else (first they need to be implemented!) diff --git a/src/pocketmine/network/mcpe/protocol/BatchPacket.php b/src/pocketmine/network/mcpe/protocol/BatchPacket.php index 0de8a39cb..7124f7515 100644 --- a/src/pocketmine/network/mcpe/protocol/BatchPacket.php +++ b/src/pocketmine/network/mcpe/protocol/BatchPacket.php @@ -91,6 +91,7 @@ class BatchPacket extends DataPacket{ /** * @return \Generator + * @phpstan-return \Generator */ public function getPackets(){ $stream = new NetworkBinaryStream($this->payload);