@@ -121,7 +121,7 @@ |
||
| 121 | 121 | * @return Project|null |
| 122 | 122 | */ |
| 123 | 123 | public function getProjectMock($id) { |
| 124 | - if($id === 2) { |
|
| 124 | + if ($id === 2) { |
|
| 125 | 125 | return null; |
| 126 | 126 | } |
| 127 | 127 | return |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | public function getFeatureMock($id) { |
| 80 | - if($id === 2) { |
|
| 80 | + if ($id === 2) { |
|
| 81 | 81 | return null; |
| 82 | 82 | } |
| 83 | 83 | return |
@@ -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; |
@@ -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(), |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | // the $metadata is the whole mapping info for this class |
| 43 | 43 | $metadata = $eventArgs->getClassMetadata(); |
| 44 | 44 | |
| 45 | - switch($metadata->getName()) { |
|
| 45 | + switch ($metadata->getName()) { |
|
| 46 | 46 | case self::MODEL_PROJECT: return $this->mapProject($metadata); |
| 47 | 47 | case self::MODEL_FEATURE: return $this->mapFeature($metadata); |
| 48 | 48 | case self::MODEL_FEEDBACK: return $this->mapFeedback($metadata); |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * @return Feature |
| 23 | 23 | */ |
| 24 | 24 | public function getFeature($id) { |
| 25 | - if(($feature = $this->em->getRepository(Feature::class)->find($id)) === null) { |
|
| 25 | + if (($feature = $this->em->getRepository(Feature::class)->find($id)) === null) { |
|
| 26 | 26 | throw new NotFoundHttpException('Feature not found'); |
| 27 | 27 | } |
| 28 | 28 | return $feature; |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | public function getProject($slug) { |
| 43 | 43 | $project = $this->em->getRepository(Project::class)->findOneBySlug($slug); |
| 44 | - if($project === null) { |
|
| 44 | + if ($project === null) { |
|
| 45 | 45 | throw new NotFoundHttpException('Project not found'); |
| 46 | 46 | } |
| 47 | 47 | return $project; |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | ->setSlug($this->slugger->slugify($name)) |
| 86 | 86 | ->setDescription($description) |
| 87 | 87 | ; |
| 88 | - if($productOwner !== null) { |
|
| 88 | + if ($productOwner !== null) { |
|
| 89 | 89 | $project->setProductOwner($productOwner); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | public function getFeedbackMock($id) { |
| 134 | - if($id === 2) { |
|
| 134 | + if ($id === 2) { |
|
| 135 | 135 | return null; |
| 136 | 136 | } |
| 137 | 137 | return |