@@ -63,6 +63,9 @@ discard block |
||
63 | 63 | $this->manager->editProject(2, 'Unknown project', 'closed', 0); |
64 | 64 | } |
65 | 65 | |
66 | + /** |
|
67 | + * @return \Doctrine\ORM\EntityManager |
|
68 | + */ |
|
66 | 69 | public function getEntityManagerMock() { |
67 | 70 | $entityManagerMock = $this |
68 | 71 | ->getMockBuilder('Doctrine\ORM\EntityManager') |
@@ -118,7 +121,7 @@ discard block |
||
118 | 121 | |
119 | 122 | /** |
120 | 123 | * @param mixed $id |
121 | - * @return Project|null |
|
124 | + * @return null|\Developtech\AgilityBundle\Model\ProjectModel |
|
122 | 125 | */ |
123 | 126 | public function getProjectMock($id) { |
124 | 127 | if($id === 2) { |
@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | public function countPerStatus(ProjectModel $project, $status) { |
21 | 21 | $statement = $this->getEntityManager()->getConnection()->prepare( |
22 | - "SELECT COUNT(*) as nb_feedbacks FROM {$this->getClassMetadata()->getTableName()} " . |
|
22 | + "SELECT COUNT(*) as nb_feedbacks FROM {$this->getClassMetadata()->getTableName()} ". |
|
23 | 23 | "WHERE project_id = :project_id AND status = :status" |
24 | 24 | ); |
25 | 25 | $statement->execute([ |
@@ -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; |