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 */