Completed
Pull Request — develop (#39)
by Axel
02:51
created
Manager/FeedbackManager.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,13 +41,13 @@
 block discarded – undo
41 41
     }
42 42
 
43 43
     /**
44
-    * @param ProjectModel $project
45
-    * @param UserInterface $author
46
-    * @param array $orderBy
47
-    * @param integer $limit
48
-    * @param integer $offset
49
-    * @return array
50
-    */
44
+     * @param ProjectModel $project
45
+     * @param UserInterface $author
46
+     * @param array $orderBy
47
+     * @param integer $limit
48
+     * @param integer $offset
49
+     * @return array
50
+     */
51 51
     public function getProjectFeedbacksByAuthor(ProjectModel $project, UserInterface $author, $orderBy = null, $limit = null, $offset = null) {
52 52
         return $this->em->getRepository($this->feedbackClass)->findBy([
53 53
             'project' => $project,
Please login to merge, or discard this patch.
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -3,16 +3,11 @@
 block discarded – undo
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\FeedbackModel;
9
-
10 8
 use Developtech\AgilityBundle\Entity\Feedback;
11
-
12 9
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
13
-
14 10
 use Developtech\AgilityBundle\Utils\Slugger;
15
-
16 11
 use Symfony\Component\Security\Core\User\UserInterface;
17 12
 
18 13
 class FeedbackManager {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
DataFixtures/ORM/LoadProjectData.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     /** @var ContainerInterface */
18 18
     private $container;
19 19
     /**
20
-     * @param ContainerInterface $container
20
+     * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
21 21
      */
22 22
     public function setContainer(ContainerInterface $container = null) {
23 23
         $this->container = $container;
Please login to merge, or discard this patch.
Entity/Project.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
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 {
Please login to merge, or discard this patch.
EventSubscriber/DynamicRelationSubscriber.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     }
58 58
 
59 59
     /**
60
-     * @param CLassMetadata $metadata
60
+     * @param ClassMetadata $metadata
61 61
      * @param UnderscoreNamingStrategy $namingStrategy
62 62
      */
63 63
     public function mapProject(ClassMetadata $metadata, UnderscoreNamingStrategy $namingStrategy) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     }
73 73
 
74 74
     /**
75
-     * @param CLassMetadata $metadata
75
+     * @param ClassMetadata $metadata
76 76
      * @param UnderscoreNamingStrategy $namingStrategy
77 77
      */
78 78
     public function mapFeature(ClassMetadata $metadata, UnderscoreNamingStrategy $namingStrategy) {
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     }
88 88
 
89 89
     /**
90
-     * @param CLassMetadata $metadata
90
+     * @param ClassMetadata $metadata
91 91
      * @param UnderscoreNamingStrategy $namingStrategy
92 92
      */
93 93
     public function mapFeedback(ClassMetadata $metadata, UnderscoreNamingStrategy $namingStrategy) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Manager/ProjectManager.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     protected $slugger;
20 20
 
21 21
     /**
22
-     * @param Doctrine\ORM\EntityManager $em
22
+     * @param EntityManager $em
23 23
      * @param Slugger $slugger
24 24
      */
25 25
     public function __construct(EntityManager $em, Slugger $slugger) {
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     /**
51 51
      * @param string $name
52 52
      * @param UserInterface $productOwner
53
-     * @return \DevelopTech\AgilityBundle\ProjectModel
53
+     * @return \Developtech\AgilityBundle\Model\ProjectModel
54 54
      */
55 55
     public function createProject($name, UserInterface $productOwner) {
56 56
         $project =
Please login to merge, or discard this patch.
Model/FeatureModel.php 1 patch
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     }
124 124
 
125 125
     /**
126
-     * @return FeatureModel
126
+     * @return ProjectModel
127 127
      */
128 128
     public function getProject() {
129 129
         return $this->project;
@@ -148,6 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
     /**
150 150
      * @var integer $userValue
151
+     * @param integer $userValue
151 152
      * @return FeatureModel
152 153
      */
153 154
     public function setUserValue($userValue) {
@@ -203,7 +204,7 @@  discard block
 block discarded – undo
203 204
      *
204 205
      * @param \DateTime $createdAt
205 206
      *
206
-     * @return ProjectModel
207
+     * @return FeatureModel
207 208
      */
208 209
     public function setCreatedAt($createdAt)
209 210
     {
@@ -227,7 +228,7 @@  discard block
 block discarded – undo
227 228
      *
228 229
      * @param \DateTime $updatedAt
229 230
      *
230
-     * @return ProjectModel
231
+     * @return FeatureModel
231 232
      */
232 233
     public function setUpdatedAt($updatedAt)
233 234
     {
Please login to merge, or discard this patch.
Model/ProjectModel.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
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
 /**
Please login to merge, or discard this patch.
Tests/Manager/FeedbackManagerTest.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -71,6 +71,9 @@
 block discarded – undo
71 71
         $this->assertEquals(3, $this->manager->countFeedbacksPerStatus((new Project())->setId(1), Feedback::STATUS_OPEN));
72 72
     }
73 73
 
74
+    /**
75
+     * @return \Doctrine\ORM\EntityManager
76
+     */
74 77
     public function getEntityManagerMock() {
75 78
         $entityManagerMock = $this
76 79
             ->getMockBuilder('Doctrine\ORM\EntityManager')
Please login to merge, or discard this patch.
Tests/Manager/ProjectManagerTest.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,6 +63,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.