Fix gamerepo

This commit is contained in:
Ruben 2016-09-04 12:00:15 +01:00
parent 2ded8129b1
commit 6693c4d60b

View file

@ -27,7 +27,7 @@ class GameRepository extends EntityRepository
"SELECT COUNT(g.id) FROM ".Game::class." g WHERE g.level = :level" "SELECT COUNT(g.id) FROM ".Game::class." g WHERE g.level = :level"
) )
->setParameters([ ->setParameters([
'level' => $game->getLevel(), 'level' => $level(),
]); ]);
return $query->getSingleScalarResult(); return $query->getSingleScalarResult();
} }
@ -40,7 +40,7 @@ class GameRepository extends EntityRepository
"SELECT MAX(g.score) FROM ".Game::class." g WHERE g.level = :level" "SELECT MAX(g.score) FROM ".Game::class." g WHERE g.level = :level"
) )
->setParameters([ ->setParameters([
'level' => $game->getLevel(), 'level' => $level,
]); ]);
return $query->getSingleScalarResult(); return $query->getSingleScalarResult();
} }