@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Developtech\AgilityBundle\Manager; |
4 | 4 | |
5 | 5 | use Doctrine\ORM\EntityManager; |
6 | - |
|
7 | 6 | use Developtech\AgilityBundle\Model\ProjectModel; |
8 | 7 | |
9 | 8 | class FeedbackManager { |
@@ -2,8 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Developtech\AgilityBundle\Model; |
4 | 4 | |
5 | -use Doctrine\ORM\Mapping as ORM; |
|
6 | - |
|
7 | 5 | use Doctrine\Common\Collections\ArrayCollection; |
8 | 6 | |
9 | 7 | /** |
@@ -3,10 +3,8 @@ |
||
3 | 3 | namespace Developtech\AgilityBundle\Manager; |
4 | 4 | |
5 | 5 | use Doctrine\ORM\EntityManager; |
6 | - |
|
7 | 6 | use Developtech\AgilityBundle\Model\ProjectModel; |
8 | 7 | use Developtech\AgilityBundle\Model\FeatureModel; |
9 | - |
|
10 | 8 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
11 | 9 | |
12 | 10 | class FeatureManager { |
@@ -3,10 +3,8 @@ |
||
3 | 3 | namespace Developtech\AgilityBundle\Manager; |
4 | 4 | |
5 | 5 | use Doctrine\ORM\EntityManager; |
6 | - |
|
7 | 6 | use Developtech\AgilityBundle\Model\ProjectModel; |
8 | 7 | use Developtech\AgilityBundle\Model\FeatureModel; |
9 | - |
|
10 | 8 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
11 | 9 | |
12 | 10 | class FeatureManager { |
@@ -41,7 +41,7 @@ |
||
41 | 41 | * @return FeatureModel |
42 | 42 | */ |
43 | 43 | public function getFeature($id) { |
44 | - if(($feature = $this->em->getRepository(Feature::class)->find($id)) === null) { |
|
44 | + if (($feature = $this->em->getRepository(Feature::class)->find($id)) === null) { |
|
45 | 45 | throw new NotFoundHttpException('Feature not found'); |
46 | 46 | } |
47 | 47 | return $feature; |
@@ -58,7 +58,7 @@ |
||
58 | 58 | * @return FeedbackModel |
59 | 59 | */ |
60 | 60 | public function getFeedback($id) { |
61 | - if(($feedback = $this->em->getRepository(Feedback::class)->find($id)) === null) { |
|
61 | + if (($feedback = $this->em->getRepository(Feedback::class)->find($id)) === null) { |
|
62 | 62 | throw new NotFoundHttpException('Feedback not found'); |
63 | 63 | } |
64 | 64 | return $feedback; |
@@ -48,7 +48,7 @@ |
||
48 | 48 | ->getNamingStrategy() |
49 | 49 | ; |
50 | 50 | |
51 | - switch($metadata->getName()) { |
|
51 | + switch ($metadata->getName()) { |
|
52 | 52 | case self::MODEL_PROJECT: return $this->mapProject($metadata, $namingStrategy); |
53 | 53 | case self::MODEL_FEATURE: return $this->mapFeature($metadata, $namingStrategy); |
54 | 54 | case self::MODEL_FEEDBACK: return $this->mapFeedback($metadata, $namingStrategy); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$loader = @include __DIR__ . '/../vendor/autoload.php'; |
|
3 | +$loader = @include __DIR__.'/../vendor/autoload.php'; |
|
4 | 4 | if (!$loader) { |
5 | 5 | die(<<<'EOT' |
6 | 6 | You must set up the project dependencies, run the following commands: |
@@ -21,8 +21,8 @@ |
||
21 | 21 | */ |
22 | 22 | public function countPerStatus(ProjectModel $project, $status) { |
23 | 23 | $statement = $this->getEntityManager()->getConnection()->prepare( |
24 | - "SELECT COUNT(*) as nb_feedbacks FROM {$this->getEntityManager()->getClassMetadata(Job::class)->getTableName()} " . |
|
25 | - "WHERE project_id = :project_id AND status = :status AND type = '" . Job::TYPE_FEEDBACK . "'" |
|
24 | + "SELECT COUNT(*) as nb_feedbacks FROM {$this->getEntityManager()->getClassMetadata(Job::class)->getTableName()} ". |
|
25 | + "WHERE project_id = :project_id AND status = :status AND type = '".Job::TYPE_FEEDBACK."'" |
|
26 | 26 | ); |
27 | 27 | $statement->execute([ |
28 | 28 | 'project_id' => $project->getId(), |