/** * gets the number of ratings * @return int */ public function getNumberOfRatings() { return (int) $this->rateableService->getRatingsFor($this->owner->ClassName, $this->owner->ID)->count(); }