diff --git a/php/servers/servers-rooms.php b/php/servers/servers-rooms.php index 165f384..a2ab78f 100644 --- a/php/servers/servers-rooms.php +++ b/php/servers/servers-rooms.php @@ -722,14 +722,22 @@ return $staff_count >= $this->get_recommended_staff_count(); } + const MAX_STAFF_RATING = 2; + /** * Return a rating for the Community's staff count relative to active users. * * @return float */ public function get_numeric_staff_rating(): float { - if (!$this->write || !$this->read) return 2; - return min(2, $this->get_staff_count() / $this->get_recommended_staff_count()); + if (!$this->write || !$this->read) { + return CommunityRoom::MAX_STAFF_RATING; + } + + return min( + CommunityRoom::MAX_STAFF_RATING, + $this->get_staff_count() / $this->get_recommended_staff_count() + ); } /**