/** * Creates new Exchange instance for calculating Exchange amount; passing * in any relevant weightings. */ protected function setExchange() { // create weightings $weightings = array(); $weightings[] = new WeightingHighScore($this->ratingsInput->getTeamAScore(), $this->ratingsInput->getTeamBScore()); if ($this->ratingsInput->isRugbyWorldCup()) { // RWC game $weightings[] = new WeightingWorldCup(); } $this->exchange = new Exchange($this->ratingsGap, $this->matchResult, $weightings); }