fix phpstan

This commit is contained in:
Dylan K. Taylor 2025-04-06 19:26:00 +01:00
parent 01c7e2de53
commit 310ca684fa
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 2 additions and 1 deletions

View File

@ -37,6 +37,7 @@ use pocketmine\entity\projectile\SplashPotion;
use pocketmine\event\block\CampfireCookEvent;
use pocketmine\event\entity\EntityDamageByBlockEvent;
use pocketmine\event\entity\EntityDamageEvent;
use pocketmine\inventory\Inventory;
use pocketmine\item\Durable;
use pocketmine\item\enchantment\VanillaEnchantments;
use pocketmine\item\Item;

View File

@ -51,7 +51,7 @@ final class EnchantingTableInventoryWindow extends BlockInventoryWindow{
){
parent::__construct($viewer, new SimpleInventory(2), $holder);
/** @phpstan-var \WeakReference<self> $weakThis */
/** @phpstan-var \WeakReference<$this> $weakThis */
$weakThis = \WeakReference::create($this);
$this->listener = new CallbackInventoryListener(
onSlotChange: static function(Inventory $_, int $slot) use ($weakThis) : void{ //remaining params unneeded