|
|
|
@ -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()
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|