From 1e624e7bb95bee7083dd6fb8f6e94b29e06a2b3a Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 18 Jan 2020 17:50:58 +0000 Subject: [PATCH] Attribute: add missing @return $this annotations --- src/pocketmine/entity/Attribute.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/pocketmine/entity/Attribute.php b/src/pocketmine/entity/Attribute.php index b3d2df765..37d0a6c18 100644 --- a/src/pocketmine/entity/Attribute.php +++ b/src/pocketmine/entity/Attribute.php @@ -145,6 +145,11 @@ class Attribute{ return $this->minValue; } + /** + * @param float $minValue + * + * @return $this + */ public function setMinValue(float $minValue){ if($minValue > ($max = $this->getMaxValue())){ throw new \InvalidArgumentException("Minimum $minValue is greater than the maximum $max"); @@ -161,6 +166,11 @@ class Attribute{ return $this->maxValue; } + /** + * @param float $maxValue + * + * @return $this + */ public function setMaxValue(float $maxValue){ if($maxValue < ($min = $this->getMinValue())){ throw new \InvalidArgumentException("Maximum $maxValue is less than the minimum $min"); @@ -177,6 +187,11 @@ class Attribute{ return $this->defaultValue; } + /** + * @param float $defaultValue + * + * @return $this + */ public function setDefaultValue(float $defaultValue){ if($defaultValue > $this->getMaxValue() or $defaultValue < $this->getMinValue()){ throw new \InvalidArgumentException("Default $defaultValue is outside the range " . $this->getMinValue() . " - " . $this->getMaxValue());