From d1e56c4611ddcc97493919613e4ad75cafda14fc Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 14 Jan 2020 15:34:40 +0000 Subject: [PATCH 1/3] Location: add missing return types for getYaw() and getPitch() --- src/pocketmine/level/Location.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pocketmine/level/Location.php b/src/pocketmine/level/Location.php index 435e82575..9dbbe003a 100644 --- a/src/pocketmine/level/Location.php +++ b/src/pocketmine/level/Location.php @@ -67,10 +67,16 @@ class Location extends Position{ return new Location($this->x, $this->y, $this->z, $this->yaw, $this->pitch, $this->level); } + /** + * @return float + */ public function getYaw(){ return $this->yaw; } + /** + * @return float + */ public function getPitch(){ return $this->pitch; } From ad4a211cba963680ff36c69fc93ebbffb3c37088 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 14 Jan 2020 15:35:14 +0000 Subject: [PATCH 2/3] Color: add missing return type annotation for fromABGR() --- src/pocketmine/utils/Color.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pocketmine/utils/Color.php b/src/pocketmine/utils/Color.php index 895ebd59b..ad45ef14e 100644 --- a/src/pocketmine/utils/Color.php +++ b/src/pocketmine/utils/Color.php @@ -192,6 +192,11 @@ class Color{ return ($this->a << 24) | ($this->b << 16) | ($this->g << 8) | $this->r; } + /** + * @param int $code + * + * @return Color + */ public static function fromABGR(int $code){ return new Color($code & 0xff, ($code >> 8) & 0xff, ($code >> 16) & 0xff, ($code >> 24) & 0xff); } From 1303cbfe02bb6b5d36700f01f6b478a9be760470 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 14 Jan 2020 15:35:46 +0000 Subject: [PATCH 3/3] UUID: add some missing return type annotations --- src/pocketmine/utils/UUID.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pocketmine/utils/UUID.php b/src/pocketmine/utils/UUID.php index 21432ad1f..b78b8e85f 100644 --- a/src/pocketmine/utils/UUID.php +++ b/src/pocketmine/utils/UUID.php @@ -119,6 +119,12 @@ class UUID{ return $this->toString(); } + /** + * @param int $partNumber + * + * @return int + * @throws \InvalidArgumentException + */ public function getPart(int $partNumber){ if($partNumber < 0 or $partNumber > 3){ throw new \InvalidArgumentException("Invalid UUID part index $partNumber"); @@ -126,6 +132,9 @@ class UUID{ return $this->parts[$partNumber]; } + /** + * @return int[] + */ public function getParts() : array{ return $this->parts; }