From 4c36ca58e2710c8fd03eec1f50a885fb97fd9b68 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 30 Jan 2020 20:53:41 +0000 Subject: [PATCH] populate missing array value types in inventory namespace --- src/pocketmine/inventory/CraftingManager.php | 3 +++ src/pocketmine/inventory/ShapelessRecipe.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/pocketmine/inventory/CraftingManager.php b/src/pocketmine/inventory/CraftingManager.php index 4691c792d..add9969e2 100644 --- a/src/pocketmine/inventory/CraftingManager.php +++ b/src/pocketmine/inventory/CraftingManager.php @@ -173,6 +173,9 @@ class CraftingManager{ return $result; } + /** + * @param Item[] $outputs + */ private static function hashOutputs(array $outputs) : string{ $outputs = self::pack($outputs); usort($outputs, [self::class, "sort"]); diff --git a/src/pocketmine/inventory/ShapelessRecipe.php b/src/pocketmine/inventory/ShapelessRecipe.php index ce4820db9..32c8eed02 100644 --- a/src/pocketmine/inventory/ShapelessRecipe.php +++ b/src/pocketmine/inventory/ShapelessRecipe.php @@ -46,6 +46,9 @@ class ShapelessRecipe implements CraftingRecipe{ $this->results = array_map(function(Item $item) : Item{ return clone $item; }, $results); } + /** + * @return Item[] + */ public function getResults() : array{ return array_map(function(Item $item) : Item{ return clone $item; }, $this->results); }