diff --git a/bin/generate_db.php b/bin/generate_db.php index 9ed3276..5dacba3 100644 --- a/bin/generate_db.php +++ b/bin/generate_db.php @@ -36,6 +36,8 @@ foreach($queries as $sql){ echo "$sql;\n"; } // updateSchema $tool->updateSchema($classes); + +die(); // ADD EMOTIONS $emotions = []; diff --git a/src/Models/GameRepository.php b/src/Models/GameRepository.php index 6c3aecc..8c52785 100644 --- a/src/Models/GameRepository.php +++ b/src/Models/GameRepository.php @@ -15,13 +15,13 @@ class GameRepository extends EntityRepository 'level' => $game->getLevel(), ]); $position = $query->getSingleScalarResult(); - $total = $this->getGameCountForLevel($game->getLevel()); + $total = $this->getCountForLevel($game->getLevel()); $highscore = $this->getHighscoreForLevel($game->getLevel()); return new Position($position, $total, $game->getScore(), $highscore); } - public function getGameCountForLevel(Level $level) { + public function getCountForLevel(Level $level) { $query = $this->_em->createQuery( "SELECT COUNT(g.id) FROM ".Game::class." g WHERE g.level = :level"