Completed
Push — develop ( 7e8dc0...09c52f )
by Axel
10:44
created
Tests/Manager/ProjectManagerTest.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
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
Please login to merge, or discard this 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', 'Where is my project ?');
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.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -3,12 +3,9 @@
 block discarded – undo
3 3
 namespace Developtech\AgilityBundle\Tests\Manager;
4 4
 
5 5
 use Developtech\AgilityBundle\Manager\ProjectManager;
6
-
7 6
 use Developtech\AgilityBundle\Entity\Project;
8 7
 use Developtech\AgilityBundle\Tests\Mock\User;
9
-
10 8
 use Developtech\AgilityBundle\Utils\Slugger;
11
-
12 9
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
13 10
 
14 11
 class ProjectManagerTest extends \PHPUnit_Framework_TestCase {
Please login to merge, or discard this patch.
Manager/ProjectManager.php 3 patches
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) {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * @param string $name
52 52
 	 * @param string $description
53 53
      * @param UserInterface $productOwner
54
-     * @return \DevelopTech\AgilityBundle\ProjectModel
54
+     * @return \Developtech\AgilityBundle\Model\ProjectModel
55 55
      */
56 56
     public function createProject($name, $description, UserInterface $productOwner) {
57 57
         $project =
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     /**
51 51
      * @param string $name
52
-	 * @param string $description
52
+     * @param string $description
53 53
      * @param UserInterface $productOwner
54 54
      * @return \DevelopTech\AgilityBundle\ProjectModel
55 55
      */
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             (new Project())
59 59
             ->setName($name)
60 60
             ->setSlug($this->slugger->slugify($name))
61
-			->setDescription($description)
61
+            ->setDescription($description)
62 62
             ->setProductOwner($productOwner)
63 63
         ;
64 64
 		
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     /**
72 72
      * @param integer $id
73 73
      * @param string $name
74
-	 * @param string $description
74
+     * @param string $description
75 75
      * @param UserInterface $productOwner
76 76
      * @throws NotFoundHttpException
77 77
      * @return ProjectModel
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $project
84 84
             ->setName($name)
85 85
             ->setSlug($this->slugger->slugify($name))
86
-			->setDescription($description)
86
+            ->setDescription($description)
87 87
         ;
88 88
         if($productOwner !== null) {
89 89
             $project->setProductOwner($productOwner);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 		
Please login to merge, or discard this patch.