/** * @param string $name * @return Tournament * @throws TournamentNotFoundException */ public function findOneByName(string $name) : Tournament { $tournament = parent::findOneByName($name); if (!$tournament instanceof Tournament) { throw new TournamentNotFoundException(); } return $tournament; }
public function findOneByName($name) { return $this->repo->findOneByName($name); }