|
|
@ -399,6 +399,14 @@
|
|
|
|
));
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Return the number of unique Community staff.
|
|
|
|
|
|
|
|
* @return int
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
function get_staff_count(): int {
|
|
|
|
|
|
|
|
return count($this->get_staff());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Return duration in seconds since room was created.
|
|
|
|
* Return duration in seconds since room was created.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -691,7 +699,7 @@
|
|
|
|
* @return bool
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function has_good_staff_rating(): bool {
|
|
|
|
public function has_good_staff_rating(): bool {
|
|
|
|
$staff_count = count($this->get_staff());
|
|
|
|
$staff_count = $this->get_staff_count();
|
|
|
|
return $staff_count >= $this->get_recommended_staff_count();
|
|
|
|
return $staff_count >= $this->get_recommended_staff_count();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -702,7 +710,7 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function get_numeric_staff_rating(): float {
|
|
|
|
public function get_numeric_staff_rating(): float {
|
|
|
|
if (!$this->write || !$this->read) return 2;
|
|
|
|
if (!$this->write || !$this->read) return 2;
|
|
|
|
return min(2, count($this->get_staff()) / $this->get_recommended_staff_count());
|
|
|
|
return min(2, $this->get_staff_count() / $this->get_recommended_staff_count());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -720,7 +728,7 @@
|
|
|
|
* Estimate whether the Community does not have enough staff.
|
|
|
|
* Estimate whether the Community does not have enough staff.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function has_poor_staff_rating(): bool {
|
|
|
|
public function has_poor_staff_rating(): bool {
|
|
|
|
return count($this->get_staff()) < $this->get_minimal_staff_count();
|
|
|
|
return $this->get_staff_count() < $this->get_minimal_staff_count();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|