@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | * |
103 | 103 | * @param int $id Id of the Backlog Item |
104 | 104 | * |
105 | - * @return array {@type Tuleap\AgileDashboard\REST\v1\BacklogItemRepresentation} |
|
105 | + * @return BacklogItemRepresentation {@type Tuleap\AgileDashboard\REST\v1\BacklogItemRepresentation} |
|
106 | 106 | * |
107 | 107 | * @throws 403 |
108 | 108 | * @throws 404 |
@@ -317,6 +317,9 @@ discard block |
||
317 | 317 | } |
318 | 318 | } |
319 | 319 | |
320 | + /** |
|
321 | + * @param integer $id |
|
322 | + */ |
|
320 | 323 | private function getArtifact($id) { |
321 | 324 | $artifact = $this->artifact_factory->getArtifactById($id); |
322 | 325 | $current_user = $this->getCurrentUser(); |
@@ -353,6 +356,9 @@ discard block |
||
353 | 356 | return new Tracker_SlicedArtifactsBuilder(new Tracker_ArtifactDao()); |
354 | 357 | } |
355 | 358 | |
359 | + /** |
|
360 | + * @param integer $limit |
|
361 | + */ |
|
356 | 362 | private function checkContentLimit($limit) { |
357 | 363 | if (! $this->limitValueIsAcceptable($limit)) { |
358 | 364 | throw new RestException(406, 'Maximum value for limit exceeded'); |
@@ -371,6 +377,11 @@ discard block |
||
371 | 377 | Header::allowOptionsGetPatch(); |
372 | 378 | } |
373 | 379 | |
380 | + /** |
|
381 | + * @param integer $limit |
|
382 | + * @param integer $offset |
|
383 | + * @param integer $size |
|
384 | + */ |
|
374 | 385 | private function sendPaginationHeaders($limit, $offset, $size) { |
375 | 386 | Header::sendPaginationHeaders($limit, $offset, $size, self::MAX_LIMIT); |
376 | 387 | } |
@@ -36,7 +36,6 @@ |
||
36 | 36 | use TrackerFactory; |
37 | 37 | use Tracker_SemanticManager; |
38 | 38 | use Tracker_SemanticCollection; |
39 | -use Tracker_FormElementFactory; |
|
40 | 39 | use Tracker_Semantic_Title; |
41 | 40 | use Tracker_Semantic_Status; |
42 | 41 | use AgileDashBoard_Semantic_InitialEffort; |
@@ -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); |
@@ -42,10 +42,10 @@ |
||
42 | 42 | use PFUser; |
43 | 43 | use Tracker_FormElement_Field_List; |
44 | 44 | use Tracker_Semantic_Status; |
45 | -use Tracker_REST_Artifact_ArtifactCreator as ArtifactCreator; |
|
46 | -use Tracker_REST_Artifact_ArtifactValidator as ArtifactValidator; |
|
47 | -use Tuleap\Tracker\REST\TrackerReference as TrackerReference; |
|
48 | -use Tuleap\Tracker\REST\v1\ArtifactValuesRepresentation as ArtifactValuesRepresentation; |
|
45 | +use Tracker_REST_Artifact_ArtifactCreator as ArtifactCreator; |
|
46 | +use Tracker_REST_Artifact_ArtifactValidator as ArtifactValidator; |
|
47 | +use Tuleap\Tracker\REST\TrackerReference as TrackerReference; |
|
48 | +use Tuleap\Tracker\REST\v1\ArtifactValuesRepresentation as ArtifactValuesRepresentation; |
|
49 | 49 | use AgileDashboard_KanbanUserPreferences; |
50 | 50 | use AgileDashboard_KanbanItemManager; |
51 | 51 | use Tuleap\RealTime\NodeJSClient; |
@@ -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 |
@@ -26,9 +26,7 @@ |
||
26 | 26 | use Tuleap\Tracker\REST\Artifact\BurndownRepresentation; |
27 | 27 | use Tuleap\REST\JsonCast; |
28 | 28 | use PlanningFactory; |
29 | - |
|
30 | 29 | use AgileDashboard_MilestonesCardwallRepresentation; |
31 | -use Tuleap\Tracker\REST\TrackerRepresentation; |
|
32 | 30 | |
33 | 31 | /** |
34 | 32 | * Representation of a milestone |
@@ -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, |