/** * @return int */ protected function getPointsParticipant2() { if ($this->match instanceof SingleMatch) { return $this->match->getPlayer2()->getPoints(); } else { if ($this->match instanceof DoubleMatch) { return $this->getPointsForTeam($this->match->getTeamTwo()); } } }