From 2404d63b1fcc9a7b65a839b752dd52e69cb503ee Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 29 Aug 2025 12:24:24 +0100 Subject: [PATCH] Ageable: added getMaxAge() we'll probably need this... --- src/block/utils/Ageable.php | 3 +++ src/block/utils/AgeableTrait.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/block/utils/Ageable.php b/src/block/utils/Ageable.php index 31fe3f459..180392ef3 100644 --- a/src/block/utils/Ageable.php +++ b/src/block/utils/Ageable.php @@ -27,7 +27,10 @@ interface Ageable{ public function getAge() : int; + public function getMaxAge() : int; + /** + * Must be in range 0 - getMaxAge() * @return $this */ public function setAge(int $age) : self; diff --git a/src/block/utils/AgeableTrait.php b/src/block/utils/AgeableTrait.php index dc1369c87..7a83ad66e 100644 --- a/src/block/utils/AgeableTrait.php +++ b/src/block/utils/AgeableTrait.php @@ -38,6 +38,8 @@ trait AgeableTrait{ public function getAge() : int{ return $this->age; } + public function getMaxAge() : int{ return self::MAX_AGE; } + /** * @return $this */