ContainerTrait: use a static-analysis-friendly way to read NBT, fixes 4 phpstan level 8 errors

This commit is contained in:
Dylan K. Taylor
2020-06-27 01:00:25 +01:00
parent f039a077cd
commit 9484220bd5
2 changed files with 1 additions and 23 deletions

View File

@ -45,26 +45,6 @@ parameters:
count: 1
path: ../../../src/block/tile/Chest.php
-
message: "#^Argument of an invalid type pocketmine\\\\nbt\\\\tag\\\\ListTag\\|null supplied for foreach, only iterables are supported\\.$#"
count: 1
path: ../../../src/block/tile/Chest.php
-
message: "#^Argument of an invalid type pocketmine\\\\nbt\\\\tag\\\\ListTag\\|null supplied for foreach, only iterables are supported\\.$#"
count: 1
path: ../../../src/block/tile/BrewingStand.php
-
message: "#^Argument of an invalid type pocketmine\\\\nbt\\\\tag\\\\ListTag\\|null supplied for foreach, only iterables are supported\\.$#"
count: 1
path: ../../../src/block/tile/Furnace.php
-
message: "#^Argument of an invalid type pocketmine\\\\nbt\\\\tag\\\\ListTag\\|null supplied for foreach, only iterables are supported\\.$#"
count: 1
path: ../../../src/block/tile/Hopper.php
-
message: "#^Parameter \\#1 \\$nbt of method pocketmine\\\\block\\\\tile\\\\Tile\\:\\:readSaveData\\(\\) expects pocketmine\\\\nbt\\\\tag\\\\CompoundTag, pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\|null given\\.$#"
count: 1