diff --git a/src/pocketmine/MemoryManager.php b/src/pocketmine/MemoryManager.php
index 93ebf8536..c3983b431 100644
--- a/src/pocketmine/MemoryManager.php
+++ b/src/pocketmine/MemoryManager.php
@@ -473,7 +473,7 @@ class MemoryManager{
self::continueDump($value, $data[$key], $objects, $refCounts, $recursion + 1, $maxNesting, $maxStringSize);
}
}elseif(is_string($from)){
- $data = "(string) len(". strlen($from) .") " . substr(Utils::printable($from), 0, $maxStringSize);
+ $data = "(string) len(" . strlen($from) . ") " . substr(Utils::printable($from), 0, $maxStringSize);
}elseif(is_resource($from)){
$data = "(resource) " . print_r($from, true);
}else{
diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php
index bbb1a2d0a..64f1272f3 100644
--- a/src/pocketmine/Player.php
+++ b/src/pocketmine/Player.php
@@ -149,6 +149,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
/**
* Checks a supplied username and checks it is valid.
+ *
* @param string $name
*
* @return bool
@@ -573,7 +574,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
/**
* @param Plugin $plugin
* @param string $name
- * @param bool $value
+ * @param bool $value
*
* @return PermissionAttachment
*/
@@ -1265,6 +1266,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
* TODO: remove this when Spectator Mode gets added properly to MCPE
*
* @param int $gamemode
+ *
* @return int
*/
public static function getClientFriendlyGamemode(int $gamemode) : int{
@@ -2554,7 +2556,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
* Transfers a player to another server.
*
* @param string $address The IP address or hostname of the destination server
- * @param int $port The destination port, defaults to 19132
+ * @param int $port The destination port, defaults to 19132
* @param string $message Message to show in the console when closing the player
*
* @return bool if transfer was successful.
@@ -2578,8 +2580,8 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
/**
* Kicks a player from the server
*
- * @param string $reason
- * @param bool $isAdmin
+ * @param string $reason
+ * @param bool $isAdmin
* @param TextContainer|string $quitMessage
*
* @return bool
@@ -2682,7 +2684,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
* Internal function used for sending titles.
*
* @param string $title
- * @param int $type
+ * @param int $type
*/
protected function sendTitleText(string $title, int $type){
$pk = new SetTitlePacket();
diff --git a/src/pocketmine/Server.php b/src/pocketmine/Server.php
index 29f541ce9..bb949830f 100644
--- a/src/pocketmine/Server.php
+++ b/src/pocketmine/Server.php
@@ -996,6 +996,7 @@ class Server{
/**
* @internal
+ *
* @param Level $level
*/
public function removeLevel(Level $level) : void{
diff --git a/src/pocketmine/command/CommandMap.php b/src/pocketmine/command/CommandMap.php
index 5cccd909f..837d6e2bd 100644
--- a/src/pocketmine/command/CommandMap.php
+++ b/src/pocketmine/command/CommandMap.php
@@ -27,7 +27,7 @@ namespace pocketmine\command;
interface CommandMap{
/**
- * @param string $fallbackPrefix
+ * @param string $fallbackPrefix
* @param Command[] $commands
*/
public function registerAll(string $fallbackPrefix, array $commands);
diff --git a/src/pocketmine/command/CommandReader.php b/src/pocketmine/command/CommandReader.php
index 15a964c5f..770633d18 100644
--- a/src/pocketmine/command/CommandReader.php
+++ b/src/pocketmine/command/CommandReader.php
@@ -95,6 +95,7 @@ class CommandReader extends Thread{
* Checks if the specified stream is a FIFO pipe.
*
* @param resource $stream
+ *
* @return bool
*/
private function isPipe($stream) : bool{
diff --git a/src/pocketmine/command/CommandSender.php b/src/pocketmine/command/CommandSender.php
index e64728ce0..97fed1b29 100644
--- a/src/pocketmine/command/CommandSender.php
+++ b/src/pocketmine/command/CommandSender.php
@@ -54,6 +54,7 @@ interface CommandSender extends Permissible{
/**
* Sets the line height used for command output pagination for this command sender. `null` will reset it to default.
+ *
* @param int|null $height
*/
public function setScreenLineHeight(int $height = null);
diff --git a/src/pocketmine/command/ConsoleCommandSender.php b/src/pocketmine/command/ConsoleCommandSender.php
index bb53d2173..09812d513 100644
--- a/src/pocketmine/command/ConsoleCommandSender.php
+++ b/src/pocketmine/command/ConsoleCommandSender.php
@@ -64,7 +64,7 @@ class ConsoleCommandSender implements CommandSender{
/**
* @param Plugin $plugin
* @param string $name
- * @param bool $value
+ * @param bool $value
*
* @return PermissionAttachment
*/
diff --git a/src/pocketmine/command/SimpleCommandMap.php b/src/pocketmine/command/SimpleCommandMap.php
index 76e859cd0..fe0b21c82 100644
--- a/src/pocketmine/command/SimpleCommandMap.php
+++ b/src/pocketmine/command/SimpleCommandMap.php
@@ -193,9 +193,9 @@ class SimpleCommandMap implements CommandMap{
/**
* @param Command $command
- * @param bool $isAlias
- * @param string $fallbackPrefix
- * @param string $label
+ * @param bool $isAlias
+ * @param string $fallbackPrefix
+ * @param string $label
*
* @return bool
*/
diff --git a/src/pocketmine/entity/DataPropertyManager.php b/src/pocketmine/entity/DataPropertyManager.php
index a6d402b15..c4afffd07 100644
--- a/src/pocketmine/entity/DataPropertyManager.php
+++ b/src/pocketmine/entity/DataPropertyManager.php
@@ -143,7 +143,8 @@ class DataPropertyManager{
*/
public function getItem(int $key) : ?Item{
$value = $this->getPropertyValue($key, Entity::DATA_TYPE_SLOT);
- assert($value instanceof Item or $value === null);
+ assert($value instanceof Item or $value === null);
+
return $value;
}
diff --git a/src/pocketmine/entity/EffectInstance.php b/src/pocketmine/entity/EffectInstance.php
index 9fed78e4d..0f1a89201 100644
--- a/src/pocketmine/entity/EffectInstance.php
+++ b/src/pocketmine/entity/EffectInstance.php
@@ -81,6 +81,7 @@ class EffectInstance{
/**
* @param int $duration
+ *
* @throws \InvalidArgumentException
*
* @return $this
diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php
index 7fcd7f8ec..6085f4ae1 100644
--- a/src/pocketmine/entity/Entity.php
+++ b/src/pocketmine/entity/Entity.php
@@ -267,8 +267,8 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
Entity::registerEntity(Snowball::class, false, ['Snowball', 'minecraft:snowball']);
Entity::registerEntity(SplashPotion::class, false, ['ThrownPotion', 'minecraft:potion', 'thrownpotion']);
Entity::registerEntity(Squid::class, false, ['Squid', 'minecraft:squid']);
- Entity::registerEntity(Villager::class, false, ['Villager', 'minecraft:villager']);
- Entity::registerEntity(Zombie::class, false, ['Zombie', 'minecraft:zombie']);
+ Entity::registerEntity(Villager::class, false, ['Villager', 'minecraft:villager']);
+ Entity::registerEntity(Zombie::class, false, ['Zombie', 'minecraft:zombie']);
Entity::registerEntity(Human::class, true);
@@ -352,7 +352,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
*
* @return CompoundTag
*/
- public static function createBaseNBT(Vector3 $pos, ?Vector3 $motion = null , float $yaw = 0.0, float $pitch = 0.0) : CompoundTag{
+ public static function createBaseNBT(Vector3 $pos, ?Vector3 $motion = null, float $yaw = 0.0, float $pitch = 0.0) : CompoundTag{
return new CompoundTag("", [
new ListTag("Pos", [
new DoubleTag("", $pos->x),
@@ -926,6 +926,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
* Called to tick entities while dead. Returns whether the entity should be flagged for despawn yet.
*
* @param int $tickDiff
+ *
* @return bool
*/
protected function onDeathUpdate(int $tickDiff) : bool{
@@ -1358,7 +1359,6 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
Timings::$timerEntityBaseTick->stopTiming();
-
$this->timings->stopTiming();
//if($this->isStatic())
@@ -1999,6 +1999,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
* Wrapper around {@link Entity#getDataFlag} for generic data flag reading.
*
* @param int $flagId
+ *
* @return bool
*/
public function getGenericFlag(int $flagId) : bool{
diff --git a/src/pocketmine/entity/Human.php b/src/pocketmine/entity/Human.php
index f0a140f9c..bdc657a2a 100644
--- a/src/pocketmine/entity/Human.php
+++ b/src/pocketmine/entity/Human.php
@@ -893,6 +893,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
* Wrapper around {@link Entity#getDataFlag} for player-specific data flag reading.
*
* @param int $flagId
+ *
* @return bool
*/
public function getPlayerFlag(int $flagId) : bool{
diff --git a/src/pocketmine/entity/Living.php b/src/pocketmine/entity/Living.php
index 4b0dd85e3..585cbbab5 100644
--- a/src/pocketmine/entity/Living.php
+++ b/src/pocketmine/entity/Living.php
@@ -326,6 +326,7 @@ abstract class Living extends Entity implements Damageable{
/**
* Sends the mob's potion effects to the specified player.
+ *
* @param Player $player
*/
public function sendPotionEffects(Player $player) : void{
@@ -769,6 +770,7 @@ abstract class Living extends Entity implements Damageable{
/**
* Sets the number of air ticks left in the entity's air supply.
+ *
* @param int $ticks
*/
public function setAirSupplyTicks(int $ticks) : void{
@@ -785,6 +787,7 @@ abstract class Living extends Entity implements Damageable{
/**
* Sets the maximum amount of air ticks the air supply can hold.
+ *
* @param int $ticks
*/
public function setMaxAirSupplyTicks(int $ticks) : void{
diff --git a/src/pocketmine/entity/object/PaintingMotive.php b/src/pocketmine/entity/object/PaintingMotive.php
index 5a9509664..c0f0cabc8 100644
--- a/src/pocketmine/entity/object/PaintingMotive.php
+++ b/src/pocketmine/entity/object/PaintingMotive.php
@@ -73,6 +73,7 @@ class PaintingMotive{
/**
* @param string $name
+ *
* @return PaintingMotive|null
*/
public static function getMotiveByName(string $name) : ?PaintingMotive{
diff --git a/src/pocketmine/entity/projectile/SplashPotion.php b/src/pocketmine/entity/projectile/SplashPotion.php
index 4d0010e59..ef4f55473 100644
--- a/src/pocketmine/entity/projectile/SplashPotion.php
+++ b/src/pocketmine/entity/projectile/SplashPotion.php
@@ -27,8 +27,8 @@ use pocketmine\block\Block;
use pocketmine\block\BlockFactory;
use pocketmine\entity\EffectInstance;
use pocketmine\entity\Living;
-use pocketmine\event\entity\ProjectileHitEntityEvent;
use pocketmine\event\entity\ProjectileHitBlockEvent;
+use pocketmine\event\entity\ProjectileHitEntityEvent;
use pocketmine\event\entity\ProjectileHitEvent;
use pocketmine\item\Potion;
use pocketmine\nbt\tag\CompoundTag;
@@ -154,6 +154,7 @@ class SplashPotion extends Throwable{
/**
* Sets whether this splash potion will create an area-effect-cloud when it lands.
+ *
* @param bool $value
*/
public function setLinger(bool $value = true) : void{
diff --git a/src/pocketmine/entity/utils/ExperienceUtils.php b/src/pocketmine/entity/utils/ExperienceUtils.php
index f0f719fd8..871036f7d 100644
--- a/src/pocketmine/entity/utils/ExperienceUtils.php
+++ b/src/pocketmine/entity/utils/ExperienceUtils.php
@@ -31,6 +31,7 @@ abstract class ExperienceUtils{
* Calculates and returns the amount of XP needed to get from level 0 to level $level
*
* @param int $level
+ *
* @return int
*/
public static function getXpToReachLevel(int $level) : int{
diff --git a/src/pocketmine/event/inventory/FurnaceBurnEvent.php b/src/pocketmine/event/inventory/FurnaceBurnEvent.php
index 72a4d0efd..b0637ccc0 100644
--- a/src/pocketmine/event/inventory/FurnaceBurnEvent.php
+++ b/src/pocketmine/event/inventory/FurnaceBurnEvent.php
@@ -40,8 +40,8 @@ class FurnaceBurnEvent extends BlockEvent implements Cancellable{
/**
* @param Furnace $furnace
- * @param Item $fuel
- * @param int $burnTime
+ * @param Item $fuel
+ * @param int $burnTime
*/
public function __construct(Furnace $furnace, Item $fuel, int $burnTime){
parent::__construct($furnace->getBlock());
diff --git a/src/pocketmine/event/inventory/FurnaceSmeltEvent.php b/src/pocketmine/event/inventory/FurnaceSmeltEvent.php
index ee099b80f..5b487d1c3 100644
--- a/src/pocketmine/event/inventory/FurnaceSmeltEvent.php
+++ b/src/pocketmine/event/inventory/FurnaceSmeltEvent.php
@@ -38,8 +38,8 @@ class FurnaceSmeltEvent extends BlockEvent implements Cancellable{
/**
* @param Furnace $furnace
- * @param Item $source
- * @param Item $result
+ * @param Item $source
+ * @param Item $result
*/
public function __construct(Furnace $furnace, Item $source, Item $result){
parent::__construct($furnace->getBlock());
diff --git a/src/pocketmine/event/player/PlayerChangeSkinEvent.php b/src/pocketmine/event/player/PlayerChangeSkinEvent.php
index 3b1d7987d..bfb854b72 100644
--- a/src/pocketmine/event/player/PlayerChangeSkinEvent.php
+++ b/src/pocketmine/event/player/PlayerChangeSkinEvent.php
@@ -63,6 +63,7 @@ class PlayerChangeSkinEvent extends PlayerEvent implements Cancellable{
/**
* @param Skin $skin
+ *
* @throws \InvalidArgumentException if the specified skin is not valid
*/
public function setNewSkin(Skin $skin) : void{
diff --git a/src/pocketmine/event/player/PlayerMoveEvent.php b/src/pocketmine/event/player/PlayerMoveEvent.php
index 10374cba3..0725faf62 100644
--- a/src/pocketmine/event/player/PlayerMoveEvent.php
+++ b/src/pocketmine/event/player/PlayerMoveEvent.php
@@ -34,7 +34,7 @@ class PlayerMoveEvent extends PlayerEvent implements Cancellable{
private $to;
/**
- * @param Player $player
+ * @param Player $player
* @param Location $from
* @param Location $to
*/
diff --git a/src/pocketmine/event/server/DataPacketSendEvent.php b/src/pocketmine/event/server/DataPacketSendEvent.php
index 99d25ed69..fbbef6362 100644
--- a/src/pocketmine/event/server/DataPacketSendEvent.php
+++ b/src/pocketmine/event/server/DataPacketSendEvent.php
@@ -34,7 +34,7 @@ class DataPacketSendEvent extends ServerEvent implements Cancellable{
private $player;
/**
- * @param Player $player
+ * @param Player $player
* @param DataPacket $packet
*/
public function __construct(Player $player, DataPacket $packet){
diff --git a/src/pocketmine/inventory/BaseInventory.php b/src/pocketmine/inventory/BaseInventory.php
index e24e102bf..27c0fd6c9 100644
--- a/src/pocketmine/inventory/BaseInventory.php
+++ b/src/pocketmine/inventory/BaseInventory.php
@@ -384,6 +384,7 @@ abstract class BaseInventory implements Inventory{
/**
* Removes the inventory window from all players currently viewing it.
+ *
* @param bool $force Force removal of permanent windows such as the player's own inventory. Used internally.
*/
public function removeAllViewers(bool $force = false) : void{
diff --git a/src/pocketmine/inventory/Inventory.php b/src/pocketmine/inventory/Inventory.php
index 199b7b04a..7e5f5d40a 100644
--- a/src/pocketmine/inventory/Inventory.php
+++ b/src/pocketmine/inventory/Inventory.php
@@ -244,6 +244,7 @@ interface Inventory{
* Returns whether the specified slot exists in the inventory.
*
* @param int $slot
+ *
* @return bool
*/
public function slotExists(int $slot) : bool;
diff --git a/src/pocketmine/inventory/PlayerInventory.php b/src/pocketmine/inventory/PlayerInventory.php
index aa915b2ca..830f3c877 100644
--- a/src/pocketmine/inventory/PlayerInventory.php
+++ b/src/pocketmine/inventory/PlayerInventory.php
@@ -60,6 +60,7 @@ class PlayerInventory extends BaseInventory{
/**
* @param int $slot
+ *
* @throws \InvalidArgumentException
*/
private function throwIfNotHotbarSlot(int $slot){
@@ -72,6 +73,7 @@ class PlayerInventory extends BaseInventory{
* Returns the item in the specified hotbar slot.
*
* @param int $hotbarSlot
+ *
* @return Item
*
* @throws \InvalidArgumentException if the hotbar slot index is out of range
@@ -137,6 +139,7 @@ class PlayerInventory extends BaseInventory{
/**
* Sends the currently-held item to specified targets.
+ *
* @param Player|Player[] $target
*/
public function sendHeldItem($target){
diff --git a/src/pocketmine/inventory/ShapedRecipe.php b/src/pocketmine/inventory/ShapedRecipe.php
index 836f49648..b15778ea9 100644
--- a/src/pocketmine/inventory/ShapedRecipe.php
+++ b/src/pocketmine/inventory/ShapedRecipe.php
@@ -46,11 +46,11 @@ class ShapedRecipe implements CraftingRecipe{
* Array of 1, 2, or 3 strings representing the rows of the recipe.
* This accepts an array of 1, 2 or 3 strings. Each string should be of the same length and must be at most 3
* characters long. Each character represents a unique type of ingredient. Spaces are interpreted as air.
- * @param Item[] $ingredients
+ * @param Item[] $ingredients
* Char => Item map of items to be set into the shape.
* This accepts an array of Items, indexed by character. Every unique character (except space) in the shape
* array MUST have a corresponding item in this list. Space character is automatically treated as air.
- * @param Item[] $results List of items that this recipe produces when crafted.
+ * @param Item[] $results List of items that this recipe produces when crafted.
*
* Note: Recipes **do not** need to be square. Do NOT add padding for empty rows/columns.
*/
diff --git a/src/pocketmine/inventory/transaction/action/DropItemAction.php b/src/pocketmine/inventory/transaction/action/DropItemAction.php
index 480db809a..fcbe694d8 100644
--- a/src/pocketmine/inventory/transaction/action/DropItemAction.php
+++ b/src/pocketmine/inventory/transaction/action/DropItemAction.php
@@ -55,6 +55,7 @@ class DropItemAction extends InventoryAction{
* Drops the target item in front of the player.
*
* @param Player $source
+ *
* @return bool
*/
public function execute(Player $source) : bool{
diff --git a/src/pocketmine/item/Armor.php b/src/pocketmine/item/Armor.php
index 85c3db956..c9ca3a20f 100644
--- a/src/pocketmine/item/Armor.php
+++ b/src/pocketmine/item/Armor.php
@@ -53,6 +53,7 @@ abstract class Armor extends Durable{
/**
* Sets the dyed colour of this armour piece. This generally only applies to leather armour.
+ *
* @param Color $color
*/
public function setCustomColor(Color $color) : void{
diff --git a/src/pocketmine/item/Durable.php b/src/pocketmine/item/Durable.php
index e0e1d00e6..37ac4244f 100644
--- a/src/pocketmine/item/Durable.php
+++ b/src/pocketmine/item/Durable.php
@@ -41,6 +41,7 @@ abstract class Durable extends Item{
/**
* Sets whether the item will take damage when used.
+ *
* @param bool $value
*/
public function setUnbreakable(bool $value = true){
@@ -49,6 +50,7 @@ abstract class Durable extends Item{
/**
* Applies damage to the item.
+ *
* @param int $amount
*
* @return bool if any damage was applied to the item
diff --git a/src/pocketmine/item/Item.php b/src/pocketmine/item/Item.php
index 562fe2675..ce3cca708 100644
--- a/src/pocketmine/item/Item.php
+++ b/src/pocketmine/item/Item.php
@@ -523,6 +523,7 @@ class Item implements ItemIds, \JsonSerializable{
/**
* @param string $name
+ *
* @return NamedTag|null
*/
public function getNamedTagEntry(string $name) : ?NamedTag{
@@ -557,6 +558,7 @@ class Item implements ItemIds, \JsonSerializable{
/**
* Sets the Item's NBT from the supplied CompoundTag object.
+ *
* @param CompoundTag $tag
*
* @return Item
@@ -589,6 +591,7 @@ class Item implements ItemIds, \JsonSerializable{
/**
* @param int $count
+ *
* @return Item
*/
public function setCount(int $count) : Item{
@@ -769,6 +772,7 @@ class Item implements ItemIds, \JsonSerializable{
* Returns whether the item was changed, for example count decrease or durability change.
*
* @param Player $player
+ *
* @return bool
*/
public function onReleaseUsing(Player $player) : bool{
@@ -834,6 +838,7 @@ class Item implements ItemIds, \JsonSerializable{
/**
* Returns whether the specified item stack has the same ID, damage, NBT and count as this item stack.
+ *
* @param Item $other
*
* @return bool
@@ -878,6 +883,7 @@ class Item implements ItemIds, \JsonSerializable{
* Returns an Item from properties created in an array by {@link Item#jsonSerialize}
*
* @param array $data
+ *
* @return Item
*/
final public static function jsonDeserialize(array $data) : Item{
diff --git a/src/pocketmine/item/Potion.php b/src/pocketmine/item/Potion.php
index 7df7eafe2..2f56a8739 100644
--- a/src/pocketmine/item/Potion.php
+++ b/src/pocketmine/item/Potion.php
@@ -111,6 +111,7 @@ class Potion extends Item implements Consumable{
* Returns a list of effects applied by potions with the specified ID.
*
* @param int $id
+ *
* @return EffectInstance[]
*/
public static function getPotionEffectsById(int $id) : array{
diff --git a/src/pocketmine/item/ProjectileItem.php b/src/pocketmine/item/ProjectileItem.php
index db9b16ca7..73ac1fd36 100644
--- a/src/pocketmine/item/ProjectileItem.php
+++ b/src/pocketmine/item/ProjectileItem.php
@@ -27,8 +27,8 @@ use pocketmine\entity\Entity;
use pocketmine\entity\projectile\Projectile;
use pocketmine\event\entity\ProjectileLaunchEvent;
use pocketmine\math\Vector3;
-use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
use pocketmine\nbt\tag\CompoundTag;
+use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
use pocketmine\Player;
abstract class ProjectileItem extends Item{
diff --git a/src/pocketmine/item/WritableBook.php b/src/pocketmine/item/WritableBook.php
index 31cf31ce1..cc73eec18 100644
--- a/src/pocketmine/item/WritableBook.php
+++ b/src/pocketmine/item/WritableBook.php
@@ -137,7 +137,7 @@ class WritableBook extends Item{
/**
* Inserts a new page with the given text and moves other pages upwards.
*
- * @param int $pageId
+ * @param int $pageId
* @param string $pageText
*
* @return bool indicating success
diff --git a/src/pocketmine/item/enchantment/EnchantmentInstance.php b/src/pocketmine/item/enchantment/EnchantmentInstance.php
index 432c96261..2434ba5b8 100644
--- a/src/pocketmine/item/enchantment/EnchantmentInstance.php
+++ b/src/pocketmine/item/enchantment/EnchantmentInstance.php
@@ -69,6 +69,7 @@ class EnchantmentInstance{
/**
* Sets the level of the enchantment.
+ *
* @param int $level
*
* @return $this
diff --git a/src/pocketmine/item/enchantment/ProtectionEnchantment.php b/src/pocketmine/item/enchantment/ProtectionEnchantment.php
index f774081db..c11e6783c 100644
--- a/src/pocketmine/item/enchantment/ProtectionEnchantment.php
+++ b/src/pocketmine/item/enchantment/ProtectionEnchantment.php
@@ -62,6 +62,7 @@ class ProtectionEnchantment extends Enchantment{
/**
* Returns the base EPF this enchantment type offers for the given enchantment level.
+ *
* @param int $level
*
* @return int
@@ -72,6 +73,7 @@ class ProtectionEnchantment extends Enchantment{
/**
* Returns whether this enchantment type offers protection from the specified damage source's cause.
+ *
* @param EntityDamageEvent $event
*
* @return bool
diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php
index 0816d0851..df9fc51cd 100644
--- a/src/pocketmine/level/Level.php
+++ b/src/pocketmine/level/Level.php
@@ -290,6 +290,7 @@ class Level implements ChunkManager, Metadatable{
/**
* @param string $str
+ *
* @return int
*/
public static function getDifficultyFromString(string $str) : int{
@@ -906,7 +907,7 @@ class Level implements ChunkManager, Metadatable{
$pk->blockRuntimeId = $b->getRuntimeId();
}else{
$fullBlock = $this->getFullBlock($b->x, $b->y, $b->z);
- $pk->blockRuntimeId = BlockFactory::toStaticRuntimeId($fullBlock >> 4, $fullBlock & 0xf);
+ $pk->blockRuntimeId = BlockFactory::toStaticRuntimeId($fullBlock >> 4, $fullBlock & 0xf);
}
$packets[] = $pk;
diff --git a/src/pocketmine/level/format/Chunk.php b/src/pocketmine/level/format/Chunk.php
index 398229cf6..e1031073d 100644
--- a/src/pocketmine/level/format/Chunk.php
+++ b/src/pocketmine/level/format/Chunk.php
@@ -51,7 +51,7 @@ class Chunk{
/** @var bool */
protected $isInit = false;
- /** @var bool*/
+ /** @var bool */
protected $lightPopulated = false;
/** @var bool */
protected $terrainGenerated = false;
@@ -325,8 +325,8 @@ class Chunk{
/**
* Returns the Y coordinate of the highest non-air block at the specified X/Z chunk block coordinates
*
- * @param int $x 0-15
- * @param int $z 0-15
+ * @param int $x 0-15
+ * @param int $z 0-15
*
* @return int 0-255, or -1 if there are no blocks in the column
*/
@@ -364,6 +364,7 @@ class Chunk{
/**
* Returns the heightmap value at the specified X/Z chunk block coordinates
+ *
* @param int $x 0-15
* @param int $z 0-15
* @param int $value
@@ -794,8 +795,8 @@ class Chunk{
$result .= $this->subChunks[$y]->networkSerialize();
}
$result .= pack("v*", ...$this->heightMap)
- . $this->biomeIds
- . chr(0); //border block array count
+ . $this->biomeIds
+ . chr(0); //border block array count
//Border block entry format: 1 byte (4 bits X, 4 bits Z). These are however useless since they crash the regular client.
foreach($this->tiles as $tile){
diff --git a/src/pocketmine/level/format/SubChunkInterface.php b/src/pocketmine/level/format/SubChunkInterface.php
index b0c816403..f777b67ec 100644
--- a/src/pocketmine/level/format/SubChunkInterface.php
+++ b/src/pocketmine/level/format/SubChunkInterface.php
@@ -27,6 +27,7 @@ interface SubChunkInterface{
/**
* @param bool $checkLight
+ *
* @return bool
*/
public function isEmpty(bool $checkLight = true) : bool;
diff --git a/src/pocketmine/level/particle/FloatingTextParticle.php b/src/pocketmine/level/particle/FloatingTextParticle.php
index cf0badbd9..4c4b511f7 100644
--- a/src/pocketmine/level/particle/FloatingTextParticle.php
+++ b/src/pocketmine/level/particle/FloatingTextParticle.php
@@ -109,8 +109,8 @@ class FloatingTextParticle extends Particle{
1 << Entity::DATA_FLAG_IMMOBILE
);
$pk->metadata = [
- Entity::DATA_FLAGS => [Entity::DATA_TYPE_LONG, $flags],
- Entity::DATA_SCALE => [Entity::DATA_TYPE_FLOAT, 0.01] //zero causes problems on debug builds
+ Entity::DATA_FLAGS => [Entity::DATA_TYPE_LONG, $flags],
+ Entity::DATA_SCALE => [Entity::DATA_TYPE_FLOAT, 0.01] //zero causes problems on debug builds
];
$p[] = $pk;
diff --git a/src/pocketmine/network/mcpe/protocol/AvailableCommandsPacket.php b/src/pocketmine/network/mcpe/protocol/AvailableCommandsPacket.php
index 8c3d3e106..4e2b94a8d 100644
--- a/src/pocketmine/network/mcpe/protocol/AvailableCommandsPacket.php
+++ b/src/pocketmine/network/mcpe/protocol/AvailableCommandsPacket.php
@@ -329,7 +329,7 @@ class AvailableCommandsPacket extends DataPacket{
foreach($commandData->overloads as $overload){
/**
* @var CommandParameter[] $overload
- * @var CommandParameter $parameter
+ * @var CommandParameter $parameter
*/
foreach($overload as $parameter){
if($parameter->enum !== null){
diff --git a/src/pocketmine/network/mcpe/protocol/LoginPacket.php b/src/pocketmine/network/mcpe/protocol/LoginPacket.php
index 4f948159a..a2f7f2c7c 100644
--- a/src/pocketmine/network/mcpe/protocol/LoginPacket.php
+++ b/src/pocketmine/network/mcpe/protocol/LoginPacket.php
@@ -90,7 +90,7 @@ class LoginPacket extends DataPacket{
}
$logger = MainLogger::getLogger();
- $logger->debug(get_class($e) . " was thrown while decoding connection request in login (protocol version " . ($this->protocol ?? "unknown") . "): " . $e->getMessage());
+ $logger->debug(get_class($e) . " was thrown while decoding connection request in login (protocol version " . ($this->protocol ?? "unknown") . "): " . $e->getMessage());
foreach(Utils::getTrace(0, $e->getTrace()) as $line){
$logger->debug($line);
}
diff --git a/src/pocketmine/network/mcpe/protocol/PacketPool.php b/src/pocketmine/network/mcpe/protocol/PacketPool.php
index 060287ac6..6452ead9d 100644
--- a/src/pocketmine/network/mcpe/protocol/PacketPool.php
+++ b/src/pocketmine/network/mcpe/protocol/PacketPool.php
@@ -159,6 +159,7 @@ class PacketPool{
/**
* @param int $pid
+ *
* @return DataPacket
*/
public static function getPacketById(int $pid) : DataPacket{
@@ -167,6 +168,7 @@ class PacketPool{
/**
* @param string $buffer
+ *
* @return DataPacket
*/
public static function getPacket(string $buffer) : DataPacket{
diff --git a/src/pocketmine/network/mcpe/protocol/StartGamePacket.php b/src/pocketmine/network/mcpe/protocol/StartGamePacket.php
index 4b9b881b8..8fedfc31a 100644
--- a/src/pocketmine/network/mcpe/protocol/StartGamePacket.php
+++ b/src/pocketmine/network/mcpe/protocol/StartGamePacket.php
@@ -64,7 +64,7 @@ class StartGamePacket extends DataPacket{
public $difficulty;
/** @var int */
public $spawnX;
- /** @var int*/
+ /** @var int */
public $spawnY;
/** @var int */
public $spawnZ;
diff --git a/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php b/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php
index 027bd6e62..1f9add8a8 100644
--- a/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php
+++ b/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php
@@ -92,6 +92,7 @@ class NetworkInventoryAction{
/**
* @param InventoryTransactionPacket $packet
+ *
* @return $this
*/
public function read(InventoryTransactionPacket $packet) : NetworkInventoryAction{
diff --git a/src/pocketmine/permission/BanEntry.php b/src/pocketmine/permission/BanEntry.php
index 3c91d5839..8d30599d2 100644
--- a/src/pocketmine/permission/BanEntry.php
+++ b/src/pocketmine/permission/BanEntry.php
@@ -119,6 +119,7 @@ class BanEntry{
* @link https://bugs.php.net/bug.php?id=75992
*
* @param \DateTime $dateTime
+ *
* @throws \RuntimeException if the argument can't be parsed from a formatted date string
*/
private static function validateDate(\DateTime $dateTime) : void{
diff --git a/src/pocketmine/permission/PermissibleBase.php b/src/pocketmine/permission/PermissibleBase.php
index 7307a07ae..3897d844e 100644
--- a/src/pocketmine/permission/PermissibleBase.php
+++ b/src/pocketmine/permission/PermissibleBase.php
@@ -106,7 +106,7 @@ class PermissibleBase implements Permissible{
*
* @param Plugin $plugin
* @param string $name
- * @param bool $value
+ * @param bool $value
*
* @return PermissionAttachment
*/
diff --git a/src/pocketmine/plugin/PluginBase.php b/src/pocketmine/plugin/PluginBase.php
index b76ffa2c2..a824b8daf 100644
--- a/src/pocketmine/plugin/PluginBase.php
+++ b/src/pocketmine/plugin/PluginBase.php
@@ -201,7 +201,7 @@ abstract class PluginBase implements Plugin{
* Saves an embedded resource to its relative location in the data folder
*
* @param string $filename
- * @param bool $replace
+ * @param bool $replace
*
* @return bool
*/
diff --git a/src/pocketmine/plugin/PluginManager.php b/src/pocketmine/plugin/PluginManager.php
index 188c4c7e9..e31cb0889 100644
--- a/src/pocketmine/plugin/PluginManager.php
+++ b/src/pocketmine/plugin/PluginManager.php
@@ -352,6 +352,7 @@ class PluginManager{
* Returns whether a specified API version string is considered compatible with the server's API version.
*
* @param string ...$versions
+ *
* @return bool
*/
public function isCompatibleApi(string ...$versions) : bool{
diff --git a/src/pocketmine/resourcepacks/ResourcePackManager.php b/src/pocketmine/resourcepacks/ResourcePackManager.php
index 952a0d7b6..16f689180 100644
--- a/src/pocketmine/resourcepacks/ResourcePackManager.php
+++ b/src/pocketmine/resourcepacks/ResourcePackManager.php
@@ -138,6 +138,7 @@ class ResourcePackManager{
* Returns the resource pack matching the specified UUID string, or null if the ID was not recognized.
*
* @param string $id
+ *
* @return ResourcePack|null
*/
public function getPackById(string $id){
diff --git a/src/pocketmine/resourcepacks/ZippedResourcePack.php b/src/pocketmine/resourcepacks/ZippedResourcePack.php
index 902b83b85..35849d698 100644
--- a/src/pocketmine/resourcepacks/ZippedResourcePack.php
+++ b/src/pocketmine/resourcepacks/ZippedResourcePack.php
@@ -32,6 +32,7 @@ class ZippedResourcePack implements ResourcePack{
* TODO: add more manifest validation
*
* @param \stdClass $manifest
+ *
* @return bool
*/
public static function verifyManifest(\stdClass $manifest) : bool{
diff --git a/src/pocketmine/scheduler/AsyncTask.php b/src/pocketmine/scheduler/AsyncTask.php
index 1272c961a..8360fd312 100644
--- a/src/pocketmine/scheduler/AsyncTask.php
+++ b/src/pocketmine/scheduler/AsyncTask.php
@@ -129,6 +129,7 @@ abstract class AsyncTask extends Collectable{
* @see AsyncWorker::getFromThreadStore()
*
* @param string $identifier
+ *
* @return mixed
*/
public function getFromThreadStore(string $identifier){
diff --git a/src/pocketmine/scheduler/AsyncWorker.php b/src/pocketmine/scheduler/AsyncWorker.php
index 8222e46d5..64c853196 100644
--- a/src/pocketmine/scheduler/AsyncWorker.php
+++ b/src/pocketmine/scheduler/AsyncWorker.php
@@ -105,6 +105,7 @@ class AsyncWorker extends Worker{
* Objects stored in this storage may ONLY be retrieved while the task is running.
*
* @param string $identifier
+ *
* @return mixed
*/
public function getFromThreadStore(string $identifier){
diff --git a/src/pocketmine/updater/AutoUpdater.php b/src/pocketmine/updater/AutoUpdater.php
index 8c9d15cd9..36fb43ca1 100644
--- a/src/pocketmine/updater/AutoUpdater.php
+++ b/src/pocketmine/updater/AutoUpdater.php
@@ -105,6 +105,7 @@ class AutoUpdater{
/**
* Shows a warning to a player to tell them there is an update available
+ *
* @param Player $player
*/
public function showPlayerUpdate(Player $player){
diff --git a/src/pocketmine/utils/Color.php b/src/pocketmine/utils/Color.php
index 3cd4b9543..83b6cce0f 100644
--- a/src/pocketmine/utils/Color.php
+++ b/src/pocketmine/utils/Color.php
@@ -47,6 +47,7 @@ class Color{
/**
* Sets the alpha (opacity) value of this colour, lower = more transparent
+ *
* @param int $a
*/
public function setA(int $a){
@@ -63,6 +64,7 @@ class Color{
/**
* Sets the red value of this colour.
+ *
* @param int $r
*/
public function setR(int $r){
@@ -79,6 +81,7 @@ class Color{
/**
* Sets the green value of this colour.
+ *
* @param int $g
*/
public function setG(int $g){
@@ -95,6 +98,7 @@ class Color{
/**
* Sets the blue value of this colour.
+ *
* @param int $b
*/
public function setB(int $b){
@@ -105,6 +109,7 @@ class Color{
* Mixes the supplied list of colours together to produce a result colour.
*
* @param Color ...$colors
+ *
* @return Color
*/
public static function mix(Color ...$colors) : Color{
@@ -127,6 +132,7 @@ class Color{
/**
* Returns a Color from the supplied RGB colour code (24-bit)
+ *
* @param int $code
*
* @return Color
diff --git a/src/pocketmine/utils/Config.php b/src/pocketmine/utils/Config.php
index 31c0185de..e09c86cfb 100644
--- a/src/pocketmine/utils/Config.php
+++ b/src/pocketmine/utils/Config.php
@@ -197,6 +197,7 @@ class Config{
* Sets the options for the JSON encoding when saving
*
* @param int $options
+ *
* @return Config $this
* @throws \RuntimeException if the Config is not in JSON
* @see json_encode
@@ -215,6 +216,7 @@ class Config{
* Enables the given option in addition to the currently set JSON options
*
* @param int $option
+ *
* @return Config $this
* @throws \RuntimeException if the Config is not in JSON
* @see json_encode
@@ -233,6 +235,7 @@ class Config{
* Disables the given option for the JSON encoding when saving
*
* @param int $option
+ *
* @return Config $this
* @throws \RuntimeException if the Config is not in JSON
* @see json_encode
diff --git a/src/pocketmine/utils/Internet.php b/src/pocketmine/utils/Internet.php
index 3f3baf5c3..b1938d583 100644
--- a/src/pocketmine/utils/Internet.php
+++ b/src/pocketmine/utils/Internet.php
@@ -76,7 +76,7 @@ class Internet{
* @param string $page
* @param int $timeout default 10
* @param array $extraHeaders
- * @param string &$err Will be set to the output of curl_error(). Use this to retrieve errors that occured during the operation.
+ * @param string &$err Will be set to the output of curl_error(). Use this to retrieve errors that occured during the operation.
* @param array[] &$headers
* @param int &$httpCode
*
diff --git a/src/pocketmine/utils/MainLogger.php b/src/pocketmine/utils/MainLogger.php
index 7fc850517..388faabf8 100644
--- a/src/pocketmine/utils/MainLogger.php
+++ b/src/pocketmine/utils/MainLogger.php
@@ -53,7 +53,7 @@ class MainLogger extends \AttachableThreadedLogger{
/**
* @param string $logFile
- * @param bool $logDebug
+ * @param bool $logDebug
*
* @throws \RuntimeException
*/
diff --git a/src/pocketmine/utils/UUID.php b/src/pocketmine/utils/UUID.php
index 092ac7e2e..655d7b811 100644
--- a/src/pocketmine/utils/UUID.php
+++ b/src/pocketmine/utils/UUID.php
@@ -47,6 +47,7 @@ class UUID{
*
* @param string $uuid
* @param int $version
+ *
* @return UUID
*/
public static function fromString(string $uuid, int $version = null) : UUID{
@@ -58,6 +59,7 @@ class UUID{
*
* @param string $uuid
* @param int $version
+ *
* @return UUID
*
* @throws \InvalidArgumentException
@@ -74,6 +76,7 @@ class UUID{
* Creates an UUIDv3 from binary data or list of binary data
*
* @param string ...$data
+ *
* @return UUID
*/
public static function fromData(string ...$data) : UUID{
diff --git a/src/pocketmine/utils/Utils.php b/src/pocketmine/utils/Utils.php
index 3459ade89..4b9122bd0 100644
--- a/src/pocketmine/utils/Utils.php
+++ b/src/pocketmine/utils/Utils.php
@@ -234,6 +234,7 @@ class Utils{
/**
* @param bool $recalculate
+ *
* @return int
*/
public static function getCoreCount(bool $recalculate = false) : int{
@@ -467,10 +468,10 @@ class Utils{
}
/**
- * @param int $severity
+ * @param int $severity
* @param string $message
* @param string $file
- * @param int $line
+ * @param int $line
*
* @return bool
* @throws \ErrorException