@@ -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 { |
@@ -6,17 +6,17 @@ |
||
| 6 | 6 | use Developtech\AgilityBundle\Utils\Slugger; |
| 7 | 7 | |
| 8 | 8 | abstract class JobManager { |
| 9 | - /** @var EntityManager **/ |
|
| 10 | - protected $em; |
|
| 11 | - /** @var Slugger **/ |
|
| 12 | - protected $slugger; |
|
| 9 | + /** @var EntityManager **/ |
|
| 10 | + protected $em; |
|
| 11 | + /** @var Slugger **/ |
|
| 12 | + protected $slugger; |
|
| 13 | 13 | |
| 14 | - /** |
|
| 15 | - * @param EntityManager $em |
|
| 16 | - * @param Slugger $slugger |
|
| 17 | - */ |
|
| 18 | - public function __construct(EntityManager $em, Slugger $slugger) { |
|
| 19 | - $this->em = $em; |
|
| 20 | - $this->slugger = $slugger; |
|
| 21 | - } |
|
| 14 | + /** |
|
| 15 | + * @param EntityManager $em |
|
| 16 | + * @param Slugger $slugger |
|
| 17 | + */ |
|
| 18 | + public function __construct(EntityManager $em, Slugger $slugger) { |
|
| 19 | + $this->em = $em; |
|
| 20 | + $this->slugger = $slugger; |
|
| 21 | + } |
|
| 22 | 22 | } |
@@ -5,174 +5,174 @@ |
||
| 5 | 5 | use Symfony\Component\Security\Core\User\UserInterface; |
| 6 | 6 | |
| 7 | 7 | abstract class JobModel { |
| 8 | - /** @var string */ |
|
| 9 | - protected $name; |
|
| 10 | - /** @var string */ |
|
| 11 | - protected $slug; |
|
| 12 | - /** @var string*/ |
|
| 13 | - protected $description; |
|
| 14 | - /** @var \DateTime*/ |
|
| 15 | - protected $createdAt; |
|
| 16 | - /** @var \DateTime */ |
|
| 17 | - protected $updatedAt; |
|
| 18 | - /** @var integer */ |
|
| 19 | - protected $status; |
|
| 20 | - /** @var ProjectModel */ |
|
| 21 | - protected $project; |
|
| 22 | - /** @var object */ |
|
| 23 | - protected $responsible; |
|
| 24 | - |
|
| 25 | - const TYPE_FEATURE = 'US'; |
|
| 26 | - const TYPE_FEEDBACK = 'FB'; |
|
| 27 | - |
|
| 28 | - /** |
|
| 29 | - * @param string $name |
|
| 30 | - * @return FeatureModel |
|
| 31 | - */ |
|
| 32 | - public function setName($name) { |
|
| 33 | - $this->name = $name; |
|
| 34 | - |
|
| 35 | - return $this; |
|
| 36 | - } |
|
| 37 | - |
|
| 38 | - /** |
|
| 39 | - * @return string |
|
| 40 | - */ |
|
| 41 | - public function getName() { |
|
| 42 | - return $this->name; |
|
| 43 | - } |
|
| 44 | - |
|
| 45 | - /** |
|
| 46 | - * @param string $slug |
|
| 47 | - * @return FeatureModel |
|
| 48 | - */ |
|
| 49 | - public function setSlug($slug) { |
|
| 50 | - $this->slug = $slug; |
|
| 51 | - |
|
| 52 | - return $this; |
|
| 53 | - } |
|
| 54 | - |
|
| 55 | - /** |
|
| 56 | - * @return string |
|
| 57 | - */ |
|
| 58 | - public function getSlug() { |
|
| 59 | - return $this->slug; |
|
| 60 | - } |
|
| 61 | - |
|
| 62 | - /** |
|
| 63 | - * @param string $description |
|
| 64 | - * @return FeatureModel |
|
| 65 | - */ |
|
| 66 | - public function setDescription($description) { |
|
| 67 | - $this->description = $description; |
|
| 68 | - |
|
| 69 | - return $this; |
|
| 70 | - } |
|
| 71 | - |
|
| 72 | - /** |
|
| 73 | - * @return string |
|
| 74 | - */ |
|
| 75 | - public function getDescription() { |
|
| 76 | - return $this->description; |
|
| 77 | - } |
|
| 78 | - |
|
| 79 | - /** |
|
| 80 | - * @param ProjectModel $project |
|
| 81 | - * @return FeatureModel |
|
| 82 | - */ |
|
| 83 | - public function setProject(ProjectModel $project) { |
|
| 84 | - $this->project = $project; |
|
| 85 | - |
|
| 86 | - return $this; |
|
| 87 | - } |
|
| 88 | - |
|
| 89 | - /** |
|
| 90 | - * @return FeatureModel |
|
| 91 | - */ |
|
| 92 | - public function getProject() { |
|
| 93 | - return $this->project; |
|
| 94 | - } |
|
| 95 | - |
|
| 96 | - /** |
|
| 97 | - * @param integer $status |
|
| 98 | - * @return FeatureModel |
|
| 99 | - */ |
|
| 100 | - public function setStatus($status) { |
|
| 101 | - $this->status = $status; |
|
| 102 | - |
|
| 103 | - return $this; |
|
| 104 | - } |
|
| 105 | - |
|
| 106 | - /** |
|
| 107 | - * @return integer |
|
| 108 | - */ |
|
| 109 | - public function getStatus() { |
|
| 110 | - return $this->status; |
|
| 111 | - } |
|
| 112 | - |
|
| 113 | - /** |
|
| 114 | - * @param UserInterface $responsible |
|
| 115 | - * @return FeatureModel |
|
| 116 | - */ |
|
| 117 | - public function setResponsible(UserInterface $responsible = null) { |
|
| 118 | - $this->responsible = $responsible; |
|
| 119 | - |
|
| 120 | - return $this; |
|
| 121 | - } |
|
| 122 | - |
|
| 123 | - /** |
|
| 124 | - * @return object |
|
| 125 | - */ |
|
| 126 | - public function getResponsible() { |
|
| 127 | - return $this->responsible; |
|
| 128 | - } |
|
| 129 | - |
|
| 130 | - |
|
| 131 | - /** |
|
| 132 | - * Set createdAt |
|
| 133 | - * |
|
| 134 | - * @param \DateTime $createdAt |
|
| 135 | - * |
|
| 136 | - * @return ProjectModel |
|
| 137 | - */ |
|
| 138 | - public function setCreatedAt($createdAt) |
|
| 139 | - { |
|
| 140 | - $this->createdAt = $createdAt; |
|
| 141 | - |
|
| 142 | - return $this; |
|
| 143 | - } |
|
| 144 | - |
|
| 145 | - /** |
|
| 146 | - * Get createdAt |
|
| 147 | - * |
|
| 148 | - * @return \DateTime |
|
| 149 | - */ |
|
| 150 | - public function getCreatedAt() |
|
| 151 | - { |
|
| 152 | - return $this->createdAt; |
|
| 153 | - } |
|
| 154 | - |
|
| 155 | - /** |
|
| 156 | - * Set updatedAt |
|
| 157 | - * |
|
| 158 | - * @param \DateTime $updatedAt |
|
| 159 | - * |
|
| 160 | - * @return ProjectModel |
|
| 161 | - */ |
|
| 162 | - public function setUpdatedAt($updatedAt) |
|
| 163 | - { |
|
| 164 | - $this->updatedAt = $updatedAt; |
|
| 165 | - |
|
| 166 | - return $this; |
|
| 167 | - } |
|
| 168 | - |
|
| 169 | - /** |
|
| 170 | - * Get updatedAt |
|
| 171 | - * |
|
| 172 | - * @return \DateTime |
|
| 173 | - */ |
|
| 174 | - public function getUpdatedAt() |
|
| 175 | - { |
|
| 176 | - return $this->updatedAt; |
|
| 177 | - } |
|
| 8 | + /** @var string */ |
|
| 9 | + protected $name; |
|
| 10 | + /** @var string */ |
|
| 11 | + protected $slug; |
|
| 12 | + /** @var string*/ |
|
| 13 | + protected $description; |
|
| 14 | + /** @var \DateTime*/ |
|
| 15 | + protected $createdAt; |
|
| 16 | + /** @var \DateTime */ |
|
| 17 | + protected $updatedAt; |
|
| 18 | + /** @var integer */ |
|
| 19 | + protected $status; |
|
| 20 | + /** @var ProjectModel */ |
|
| 21 | + protected $project; |
|
| 22 | + /** @var object */ |
|
| 23 | + protected $responsible; |
|
| 24 | + |
|
| 25 | + const TYPE_FEATURE = 'US'; |
|
| 26 | + const TYPE_FEEDBACK = 'FB'; |
|
| 27 | + |
|
| 28 | + /** |
|
| 29 | + * @param string $name |
|
| 30 | + * @return FeatureModel |
|
| 31 | + */ |
|
| 32 | + public function setName($name) { |
|
| 33 | + $this->name = $name; |
|
| 34 | + |
|
| 35 | + return $this; |
|
| 36 | + } |
|
| 37 | + |
|
| 38 | + /** |
|
| 39 | + * @return string |
|
| 40 | + */ |
|
| 41 | + public function getName() { |
|
| 42 | + return $this->name; |
|
| 43 | + } |
|
| 44 | + |
|
| 45 | + /** |
|
| 46 | + * @param string $slug |
|
| 47 | + * @return FeatureModel |
|
| 48 | + */ |
|
| 49 | + public function setSlug($slug) { |
|
| 50 | + $this->slug = $slug; |
|
| 51 | + |
|
| 52 | + return $this; |
|
| 53 | + } |
|
| 54 | + |
|
| 55 | + /** |
|
| 56 | + * @return string |
|
| 57 | + */ |
|
| 58 | + public function getSlug() { |
|
| 59 | + return $this->slug; |
|
| 60 | + } |
|
| 61 | + |
|
| 62 | + /** |
|
| 63 | + * @param string $description |
|
| 64 | + * @return FeatureModel |
|
| 65 | + */ |
|
| 66 | + public function setDescription($description) { |
|
| 67 | + $this->description = $description; |
|
| 68 | + |
|
| 69 | + return $this; |
|
| 70 | + } |
|
| 71 | + |
|
| 72 | + /** |
|
| 73 | + * @return string |
|
| 74 | + */ |
|
| 75 | + public function getDescription() { |
|
| 76 | + return $this->description; |
|
| 77 | + } |
|
| 78 | + |
|
| 79 | + /** |
|
| 80 | + * @param ProjectModel $project |
|
| 81 | + * @return FeatureModel |
|
| 82 | + */ |
|
| 83 | + public function setProject(ProjectModel $project) { |
|
| 84 | + $this->project = $project; |
|
| 85 | + |
|
| 86 | + return $this; |
|
| 87 | + } |
|
| 88 | + |
|
| 89 | + /** |
|
| 90 | + * @return FeatureModel |
|
| 91 | + */ |
|
| 92 | + public function getProject() { |
|
| 93 | + return $this->project; |
|
| 94 | + } |
|
| 95 | + |
|
| 96 | + /** |
|
| 97 | + * @param integer $status |
|
| 98 | + * @return FeatureModel |
|
| 99 | + */ |
|
| 100 | + public function setStatus($status) { |
|
| 101 | + $this->status = $status; |
|
| 102 | + |
|
| 103 | + return $this; |
|
| 104 | + } |
|
| 105 | + |
|
| 106 | + /** |
|
| 107 | + * @return integer |
|
| 108 | + */ |
|
| 109 | + public function getStatus() { |
|
| 110 | + return $this->status; |
|
| 111 | + } |
|
| 112 | + |
|
| 113 | + /** |
|
| 114 | + * @param UserInterface $responsible |
|
| 115 | + * @return FeatureModel |
|
| 116 | + */ |
|
| 117 | + public function setResponsible(UserInterface $responsible = null) { |
|
| 118 | + $this->responsible = $responsible; |
|
| 119 | + |
|
| 120 | + return $this; |
|
| 121 | + } |
|
| 122 | + |
|
| 123 | + /** |
|
| 124 | + * @return object |
|
| 125 | + */ |
|
| 126 | + public function getResponsible() { |
|
| 127 | + return $this->responsible; |
|
| 128 | + } |
|
| 129 | + |
|
| 130 | + |
|
| 131 | + /** |
|
| 132 | + * Set createdAt |
|
| 133 | + * |
|
| 134 | + * @param \DateTime $createdAt |
|
| 135 | + * |
|
| 136 | + * @return ProjectModel |
|
| 137 | + */ |
|
| 138 | + public function setCreatedAt($createdAt) |
|
| 139 | + { |
|
| 140 | + $this->createdAt = $createdAt; |
|
| 141 | + |
|
| 142 | + return $this; |
|
| 143 | + } |
|
| 144 | + |
|
| 145 | + /** |
|
| 146 | + * Get createdAt |
|
| 147 | + * |
|
| 148 | + * @return \DateTime |
|
| 149 | + */ |
|
| 150 | + public function getCreatedAt() |
|
| 151 | + { |
|
| 152 | + return $this->createdAt; |
|
| 153 | + } |
|
| 154 | + |
|
| 155 | + /** |
|
| 156 | + * Set updatedAt |
|
| 157 | + * |
|
| 158 | + * @param \DateTime $updatedAt |
|
| 159 | + * |
|
| 160 | + * @return ProjectModel |
|
| 161 | + */ |
|
| 162 | + public function setUpdatedAt($updatedAt) |
|
| 163 | + { |
|
| 164 | + $this->updatedAt = $updatedAt; |
|
| 165 | + |
|
| 166 | + return $this; |
|
| 167 | + } |
|
| 168 | + |
|
| 169 | + /** |
|
| 170 | + * Get updatedAt |
|
| 171 | + * |
|
| 172 | + * @return \DateTime |
|
| 173 | + */ |
|
| 174 | + public function getUpdatedAt() |
|
| 175 | + { |
|
| 176 | + return $this->updatedAt; |
|
| 177 | + } |
|
| 178 | 178 | } |
@@ -14,44 +14,44 @@ |
||
| 14 | 14 | * @ORM\HasLifecycleCallbacks() |
| 15 | 15 | */ |
| 16 | 16 | class Feedback extends Job { |
| 17 | - /** @var UserInterface */ |
|
| 18 | - protected $author; |
|
| 19 | - |
|
| 20 | - const STATUS_OPEN = 0; |
|
| 21 | - const STATUS_TO_DO = 1; |
|
| 22 | - const STATUS_IN_PROGRESS = 2; |
|
| 23 | - const STATUS_TO_VALIDATE = 3; |
|
| 24 | - const STATUS_DONE = 4; |
|
| 25 | - const STATUS_CLOSED = 5; |
|
| 26 | - |
|
| 27 | - /** |
|
| 28 | - * Set author |
|
| 29 | - * |
|
| 30 | - * @param UserInterface $author |
|
| 31 | - * |
|
| 32 | - * @return FeedbackModel |
|
| 33 | - */ |
|
| 34 | - public function setAuthor(UserInterface $author) |
|
| 35 | - { |
|
| 36 | - $this->author = $author; |
|
| 37 | - |
|
| 38 | - return $this; |
|
| 39 | - } |
|
| 40 | - |
|
| 41 | - /** |
|
| 42 | - * Get author |
|
| 43 | - * |
|
| 44 | - * @return UserInterface |
|
| 45 | - */ |
|
| 46 | - public function getAuthor() |
|
| 47 | - { |
|
| 48 | - return $this->author; |
|
| 49 | - } |
|
| 50 | - |
|
| 51 | - /** |
|
| 52 | - * @return string |
|
| 53 | - */ |
|
| 54 | - public function getType() { |
|
| 55 | - return self::TYPE_FEEDBACK; |
|
| 56 | - } |
|
| 17 | + /** @var UserInterface */ |
|
| 18 | + protected $author; |
|
| 19 | + |
|
| 20 | + const STATUS_OPEN = 0; |
|
| 21 | + const STATUS_TO_DO = 1; |
|
| 22 | + const STATUS_IN_PROGRESS = 2; |
|
| 23 | + const STATUS_TO_VALIDATE = 3; |
|
| 24 | + const STATUS_DONE = 4; |
|
| 25 | + const STATUS_CLOSED = 5; |
|
| 26 | + |
|
| 27 | + /** |
|
| 28 | + * Set author |
|
| 29 | + * |
|
| 30 | + * @param UserInterface $author |
|
| 31 | + * |
|
| 32 | + * @return FeedbackModel |
|
| 33 | + */ |
|
| 34 | + public function setAuthor(UserInterface $author) |
|
| 35 | + { |
|
| 36 | + $this->author = $author; |
|
| 37 | + |
|
| 38 | + return $this; |
|
| 39 | + } |
|
| 40 | + |
|
| 41 | + /** |
|
| 42 | + * Get author |
|
| 43 | + * |
|
| 44 | + * @return UserInterface |
|
| 45 | + */ |
|
| 46 | + public function getAuthor() |
|
| 47 | + { |
|
| 48 | + return $this->author; |
|
| 49 | + } |
|
| 50 | + |
|
| 51 | + /** |
|
| 52 | + * @return string |
|
| 53 | + */ |
|
| 54 | + public function getType() { |
|
| 55 | + return self::TYPE_FEEDBACK; |
|
| 56 | + } |
|
| 57 | 57 | } |