@@ -112,7 +112,6 @@ discard block |
||
112 | 112 | * |
113 | 113 | * @param int $id Id of the column |
114 | 114 | * @param int $kanban_id Id of the Kanban {@from query} |
115 | - * @param KanbanColumnPATCHRepresentation $column The kanban column {@from body} {@type Tuleap\AgileDashboard\REST\v1\Kanban\KanbanColumnPATCHRepresentation} |
|
116 | 115 | * |
117 | 116 | * @throws 401 |
118 | 117 | * @throws 404 |
@@ -182,7 +181,8 @@ discard block |
||
182 | 181 | } |
183 | 182 | } |
184 | 183 | |
185 | - /** @return AgileDashboard_Kanban */ |
|
184 | + /** @param integer $id |
|
185 | +/** @return AgileDashboard_Kanban */ |
|
186 | 186 | private function getKanban(PFUser $user, $id) { |
187 | 187 | try { |
188 | 188 | $kanban = $this->kanban_factory->getKanban($user, $id); |
@@ -32,6 +32,11 @@ |
||
32 | 32 | /** @var int */ |
33 | 33 | public $total_size; |
34 | 34 | |
35 | + /** |
|
36 | + * @param integer $column_id |
|
37 | + * @param integer $limit |
|
38 | + * @param integer $offset |
|
39 | + */ |
|
35 | 40 | public function build(PFUser $user, AgileDashboard_Kanban $kanban, $column_id, $limit, $offset) { |
36 | 41 | $dao = new AgileDashboard_KanbanItemDao(); |
37 | 42 | $factory = Tracker_ArtifactFactory::instance(); |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | * @access hybrid |
230 | 230 | * |
231 | 231 | * @param int $id Id of the artifact |
232 | - * @return Tuleap\AgileDashboard\REST\v1\Kanban\KanbanRepresentation |
|
232 | + * @return KanbanItemRepresentation |
|
233 | 233 | */ |
234 | 234 | protected function get($id) { |
235 | 235 | $this->checkAccess(); |
@@ -325,7 +325,8 @@ discard block |
||
325 | 325 | |
326 | 326 | } |
327 | 327 | |
328 | - /** @return AgileDashboard_Kanban */ |
|
328 | + /** @param integer $id |
|
329 | +/** @return AgileDashboard_Kanban */ |
|
329 | 330 | private function getKanban(PFUser $user, $id) { |
330 | 331 | try { |
331 | 332 | $kanban = $this->kanban_factory->getKanban($user, $id); |
@@ -85,6 +85,11 @@ |
||
85 | 85 | */ |
86 | 86 | public $user_can_reorder_columns; |
87 | 87 | |
88 | + /** |
|
89 | + * @param boolean $user_can_add_columns |
|
90 | + * @param boolean $user_can_reorder_columns |
|
91 | + * @param boolean $user_can_add_in_place |
|
92 | + */ |
|
88 | 93 | public function build( |
89 | 94 | AgileDashboard_Kanban $kanban, |
90 | 95 | AgileDashboard_KanbanColumnFactory $column_factory, |
@@ -53,7 +53,7 @@ |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
56 | - * @return Tuleap\AgileDashboard\REST\v1\Kanban\KanbanRepresentation |
|
56 | + * @return KanbanRepresentation |
|
57 | 57 | */ |
58 | 58 | public function build(AgileDashboard_Kanban $kanban, PFUser $user) { |
59 | 59 |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | * |
252 | 252 | * @param int $id Id of the milestone |
253 | 253 | * |
254 | - * @return Tuleap\AgileDashboard\REST\v1\MilestoneRepresentation |
|
254 | + * @return MilestoneRepresentation |
|
255 | 255 | * |
256 | 256 | * @throws 403 |
257 | 257 | * @throws 404 |
@@ -800,6 +800,9 @@ discard block |
||
800 | 800 | $this->sendAllowHeaderForBacklog(); |
801 | 801 | } |
802 | 802 | |
803 | + /** |
|
804 | + * @param PFUser $user |
|
805 | + */ |
|
803 | 806 | private function getBacklogItemAsArtifact($user, $artifact_id) { |
804 | 807 | $artifact = $this->tracker_artifact_factory->getArtifactById($artifact_id); |
805 | 808 | |
@@ -894,6 +897,9 @@ discard block |
||
894 | 897 | return $burndown; |
895 | 898 | } |
896 | 899 | |
900 | + /** |
|
901 | + * @param integer $id |
|
902 | + */ |
|
897 | 903 | private function getMilestoneById(PFUser $user, $id) { |
898 | 904 | try { |
899 | 905 | $milestone = $this->milestone_factory->getValidatedBareMilestoneByArtifactId($user, $id); |
@@ -917,6 +923,10 @@ discard block |
||
917 | 923 | return UserManager::instance()->getCurrentUser(); |
918 | 924 | } |
919 | 925 | |
926 | + /** |
|
927 | + * @param \Planning_ArtifactMilestone $milestone |
|
928 | + * @param \AgileDashboard_Milestone_Backlog_DescendantBacklogStrategy $strategy |
|
929 | + */ |
|
920 | 930 | private function getMilestoneContentItems($milestone, $strategy) { |
921 | 931 | return $this->backlog_item_collection_factory->getAllCollection( |
922 | 932 | $this->getCurrentUser(), |
@@ -926,6 +936,9 @@ discard block |
||
926 | 936 | ); |
927 | 937 | } |
928 | 938 | |
939 | + /** |
|
940 | + * @param integer $limit |
|
941 | + */ |
|
929 | 942 | private function checkContentLimit($limit) { |
930 | 943 | if (! $this->limitValueIsAcceptable($limit)) { |
931 | 944 | throw new RestException(406, 'Maximum value for limit exceeded'); |
@@ -940,6 +953,10 @@ discard block |
||
940 | 953 | Header::allowOptionsGetPutPatch(); |
941 | 954 | } |
942 | 955 | |
956 | + /** |
|
957 | + * @param integer $limit |
|
958 | + * @param integer $offset |
|
959 | + */ |
|
943 | 960 | private function sendPaginationHeaders($limit, $offset, $size) { |
944 | 961 | Header::sendPaginationHeaders($limit, $offset, $size, self::MAX_LIMIT); |
945 | 962 | } |
@@ -952,6 +969,9 @@ discard block |
||
952 | 969 | Header::allowOptionsGetPut(); |
953 | 970 | } |
954 | 971 | |
972 | + /** |
|
973 | + * @param \Planning_ArtifactMilestone $milestone |
|
974 | + */ |
|
955 | 975 | private function sendAllowHeadersForMilestone($milestone) { |
956 | 976 | $date = $milestone->getLastModifiedDate(); |
957 | 977 | Header::allowOptionsGet(); |
@@ -96,6 +96,9 @@ discard block |
||
96 | 96 | return $this->validateArtifactsForMilestoneContent($ids, $milestone, $user, true); |
97 | 97 | } |
98 | 98 | |
99 | + /** |
|
100 | + * @param boolean $accept_closed |
|
101 | + */ |
|
99 | 102 | private function validateArtifactsForMilestoneContent(array $ids, Planning_Milestone $milestone, PFUser $user, $accept_closed) { |
100 | 103 | $open_unplanned = null; |
101 | 104 | $todo = null; |
@@ -274,6 +277,9 @@ discard block |
||
274 | 277 | return $index; |
275 | 278 | } |
276 | 279 | |
280 | + /** |
|
281 | + * @param Planning_Milestone $milestone |
|
282 | + */ |
|
277 | 283 | private function getMilestoneBacklogItems(PFUser $user, $milestone) { |
278 | 284 | return $this->backlog_item_collection_factory->getUnplannedOpenCollection( |
279 | 285 | $user, |
@@ -117,6 +117,9 @@ discard block |
||
117 | 117 | return $planning; |
118 | 118 | } |
119 | 119 | |
120 | + /** |
|
121 | + * @param integer $limit |
|
122 | + */ |
|
120 | 123 | private function limitValueIsAcceptable($limit) { |
121 | 124 | return $limit <= self::MAX_LIMIT; |
122 | 125 | } |
@@ -125,6 +128,10 @@ discard block |
||
125 | 128 | return UserManager::instance()->getCurrentUser(); |
126 | 129 | } |
127 | 130 | |
131 | + /** |
|
132 | + * @param integer $limit |
|
133 | + * @param integer $offset |
|
134 | + */ |
|
128 | 135 | private function getMilestonesByPlanning(Planning $planning, $limit, $offset) { |
129 | 136 | $all_milestones = array(); |
130 | 137 | $milestones = $this->milestone_factory->getAllBareMilestones($this->getCurrentUser(), $planning); |
@@ -137,6 +144,9 @@ discard block |
||
137 | 144 | return $milestones_representations; |
138 | 145 | } |
139 | 146 | |
147 | + /** |
|
148 | + * @param integer $size |
|
149 | + */ |
|
140 | 150 | private function sendPaginationHeaders($limit, $offset, $size) { |
141 | 151 | Header::sendPaginationHeaders($limit, $offset, $size, self::MAX_LIMIT); |
142 | 152 | } |
@@ -233,6 +233,10 @@ discard block |
||
233 | 233 | } |
234 | 234 | } |
235 | 235 | |
236 | + /** |
|
237 | + * @param PFUser $user |
|
238 | + * @param Project $project |
|
239 | + */ |
|
236 | 240 | private function validateArtifactIdsAreInUnassignedTopBacklog($ids, $user, $project) { |
237 | 241 | try { |
238 | 242 | $this->milestone_validator->validateArtifactIdsAreInUnassignedTopBacklog($ids, $user, $project); |
@@ -245,6 +249,9 @@ discard block |
||
245 | 249 | } |
246 | 250 | } |
247 | 251 | |
252 | + /** |
|
253 | + * @param integer $size |
|
254 | + */ |
|
248 | 255 | private function sendPaginationHeaders($limit, $offset, $size) { |
249 | 256 | Header::sendPaginationHeaders($limit, $offset, $size, self::MAX_LIMIT); |
250 | 257 | } |