From d2ace6bdd204b7e16cd47f0fe42e86fcd25f4857 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 21 Aug 2017 17:17:14 +0100 Subject: [PATCH] added some typedocs shut up PhpStorm --- src/pocketmine/item/Item.php | 2 ++ src/pocketmine/level/Level.php | 1 + 2 files changed, 3 insertions(+) diff --git a/src/pocketmine/item/Item.php b/src/pocketmine/item/Item.php index 1c5fee532..498c03018 100644 --- a/src/pocketmine/item/Item.php +++ b/src/pocketmine/item/Item.php @@ -729,6 +729,7 @@ class Item implements ItemIds, \JsonSerializable{ $tag = $this->getNamedTagEntry("display"); if($tag instanceof CompoundTag and isset($tag->Lore) and $tag->Lore instanceof ListTag){ $lines = []; + /** @var StringTag $line */ foreach($tag->Lore->getValue() as $line){ $lines[] = $line->getValue(); } @@ -1121,6 +1122,7 @@ class Item implements ItemIds, \JsonSerializable{ } if(isset($tag->tag) and $tag->tag instanceof CompoundTag){ + /** @var CompoundTag $t */ $t = clone $tag->tag; $t->setName(""); $item->setNamedTag($t); diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index 0b922b494..6c8c6df5d 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -1887,6 +1887,7 @@ class Level implements ChunkManager, Metadatable{ for($x = $minX; $x <= $maxX; ++$x){ for($z = $minZ; $z <= $maxZ; ++$z){ foreach($this->getChunkEntities($x, $z) as $ent){ + /** @var Entity|null $entity */ if(($entity === null or ($ent !== $entity and $entity->canCollideWith($ent))) and $ent->boundingBox->intersectsWith($bb)){ $nearby[] = $ent; }