/** * Generate a list of bets to process */ public function genBetsToProcess() { foreach ($this->betList as $betId) { $bet = new Bet($betId); $match = $this->d->getMatchById($bet->getMatchId()); if ($match->getScoreId() != NULL) { // Referee ID is -1 as long as score etc is not added to match // Match was played, add bet to list of betsToProcess array_push($this->betsToProcess, $bet); } } }