public function votesSummary() { $votes = ['up' => 0, 'down' => 0]; foreach ($this->beatmapDiscussionVotes as $vote) { if ($vote->score === 1) { $votes['up'] += 1; } elseif ($vote->score === -1) { $votes['down'] += 1; } } return $votes; }