From 48f43136d957f3911c37090f9a4a3835db46fb00 Mon Sep 17 00:00:00 2001 From: Ruben Date: Sun, 4 Sep 2016 12:05:09 +0100 Subject: [PATCH] JMS formatting on some models --- src/Models/GameRepository.php | 2 +- src/Models/Hit.php | 2 +- src/Models/Level.php | 2 ++ src/Models/Target.php | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Models/GameRepository.php b/src/Models/GameRepository.php index 5700e13..6c3aecc 100644 --- a/src/Models/GameRepository.php +++ b/src/Models/GameRepository.php @@ -27,7 +27,7 @@ class GameRepository extends EntityRepository "SELECT COUNT(g.id) FROM ".Game::class." g WHERE g.level = :level" ) ->setParameters([ - 'level' => $level(), + 'level' => $level, ]); return $query->getSingleScalarResult(); } diff --git a/src/Models/Hit.php b/src/Models/Hit.php index cc91670..94d0f7d 100644 --- a/src/Models/Hit.php +++ b/src/Models/Hit.php @@ -633,7 +633,7 @@ class Hit /** * Gets the value of game. - * + * @JMS\Exclude * @return mixed */ public function getGame() diff --git a/src/Models/Level.php b/src/Models/Level.php index 9e15f8c..e34e163 100644 --- a/src/Models/Level.php +++ b/src/Models/Level.php @@ -33,10 +33,12 @@ class Level /** * @ORM\OneToMany(targetEntity="Target", mappedBy="level", cascade={"persist"}) + * @OrderBy({"position" = "ASC"}) */ private $targets; /** + * @JMS\Exclude * @ORM\OneToMany(targetEntity="Game", mappedBy="level", fetch="EXTRA_LAZY") */ private $games; diff --git a/src/Models/Target.php b/src/Models/Target.php index 9cb2320..4649515 100644 --- a/src/Models/Target.php +++ b/src/Models/Target.php @@ -58,6 +58,7 @@ class Target private $score; /** + * @JMS\Exclude * @ORM\OneToMany(targetEntity="Hit", mappedBy="target", fetch="EXTRA_LAZY") */ private $hits;