Example #1
0
 private function validateSets(\Club\MatchBundle\Entity\Match $match)
 {
     $best_of = $this->ranking->getGameSet();
     $set = count(preg_split("/ /", $match->getDisplayResult()));
     if ($set < $best_of / 2) {
         throw new \Exception('You have not played enough sets.');
     }
 }