fix PHPStan

This commit is contained in:
Dylan K. Taylor
2022-06-29 17:18:44 +01:00
parent ff96f1b93c
commit cab56b0479
2 changed files with 5 additions and 5 deletions

View File

@ -258,9 +258,9 @@ class CraftingManager{
public function matchBrewingRecipe(Item $input, Item $ingredient) : ?BrewingRecipe{
$inputHash = morton2d_encode($input->getId(), $input->getMeta());
$ingredientHash = morton2d_encode($ingredient->getId(), $ingredient->getMeta());
$recipe = $this->brewingRecipeCache[$inputHash][$ingredientHash] ?? null;
if($recipe !== null){
return $recipe;
$cached = $this->brewingRecipeCache[$inputHash][$ingredientHash] ?? null;
if($cached !== null){
return $cached;
}
foreach($this->potionContainerChangeRecipes as $recipe){