/** * @param GenderCode $genderCode * @param Tables $tables * @return float */ public function getWeightInKg(GenderCode $genderCode, Tables $tables) { if ($genderCode->isMale()) { /** @noinspection ExceptionsAnnotatingAndHandlingInspection */ return $tables->getRacesTable()->getMaleWeightInKg($this->getRaceCode(), $this->getSubraceCode()); } /** @noinspection ExceptionsAnnotatingAndHandlingInspection */ return $tables->getRacesTable()->getFemaleWeightInKg($this->getRaceCode(), $this->getSubraceCode(), $tables->getFemaleModifiersTable(), $tables->getWeightTable()); }