@@ -131,6 +131,9 @@ |
||
131 | 131 | ); |
132 | 132 | } |
133 | 133 | |
134 | + /** |
|
135 | + * @param string $root_planning_name |
|
136 | + */ |
|
134 | 137 | private function getPlanningAdminPresenterList(PFUser $user, $group_id, $root_planning_name) { |
135 | 138 | $plannings = array(); |
136 | 139 | $planning_out_of_hierarchy = array(); |
@@ -35,6 +35,9 @@ discard block |
||
35 | 35 | $this->event_manager = EventManager::instance(); |
36 | 36 | } |
37 | 37 | |
38 | + /** |
|
39 | + * @param string $type |
|
40 | + */ |
|
38 | 41 | private function addHit($project_id, $type) { |
39 | 42 | $params = array( |
40 | 43 | 'project_id' => $project_id, |
@@ -43,22 +46,37 @@ discard block |
||
43 | 46 | $this->event_manager->processEvent('aggregate_statistics', $params); |
44 | 47 | } |
45 | 48 | |
49 | + /** |
|
50 | + * @param integer $project_id |
|
51 | + */ |
|
46 | 52 | public function addCardDragAndDropHit($project_id) { |
47 | 53 | $this->addHit($project_id, self::CARD_DRAG_AND_DROP); |
48 | 54 | } |
49 | 55 | |
56 | + /** |
|
57 | + * @param integer $project_id |
|
58 | + */ |
|
50 | 59 | public function addExpandCollapseColumnHit($project_id) { |
51 | 60 | $this->addHit($project_id, self::EXPAND_COLLAPSE_COLUMN); |
52 | 61 | } |
53 | 62 | |
63 | + /** |
|
64 | + * @param integer $project_id |
|
65 | + */ |
|
54 | 66 | public function addWIPModificationHit($project_id) { |
55 | 67 | $this->addHit($project_id, self::WIP_MODIFICATION); |
56 | 68 | } |
57 | 69 | |
70 | + /** |
|
71 | + * @param integer $project_id |
|
72 | + */ |
|
58 | 73 | public function addKanbanRenamingHit($project_id) { |
59 | 74 | $this->addHit($project_id, self::KANBAN_RENAMING); |
60 | 75 | } |
61 | 76 | |
77 | + /** |
|
78 | + * @param integer $project_id |
|
79 | + */ |
|
62 | 80 | public function addKanbanAddInPlaceHit($project_id) { |
63 | 81 | $this->addHit($project_id, self::KANBAN_ADD_IN_PLACE); |
64 | 82 | } |
@@ -73,6 +91,9 @@ discard block |
||
73 | 91 | return $res; |
74 | 92 | } |
75 | 93 | |
94 | + /** |
|
95 | + * @param string $statistic_name |
|
96 | + */ |
|
76 | 97 | public function getStatistics($statistic_name, $date_start, $date_end) { |
77 | 98 | $statistics_data = array(); |
78 | 99 | $params = array( |
@@ -43,6 +43,8 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
46 | + * @param integer $limit |
|
47 | + * @param integer $offset |
|
46 | 48 | * @return AgileDashboard_BacklogItem_PaginatedBacklogItemsRepresentations; |
47 | 49 | */ |
48 | 50 | public function getPaginatedBacklogItemsRepresentationsForMilestone(PFUser $user, Planning_Milestone $milestone, $limit, $offset) { |
@@ -60,6 +62,9 @@ discard block |
||
60 | 62 | return $this->getBacklogItemsRepresentations($user, $top_milestone, $strategy); |
61 | 63 | } |
62 | 64 | |
65 | + /** |
|
66 | + * @param AgileDashboard_Milestone_Backlog_DescendantBacklogStrategy $strategy |
|
67 | + */ |
|
63 | 68 | private function getBacklogItemsRepresentations(PFUser $user, Planning_Milestone $milestone, $strategy) { |
64 | 69 | $backlog_items = $this->getMilestoneBacklogItems($user, $milestone, $strategy); |
65 | 70 | $backlog_items_representations = array(); |
@@ -71,6 +76,9 @@ discard block |
||
71 | 76 | return new AgileDashboard_BacklogItem_PaginatedBacklogItemsRepresentations($backlog_items_representations, $backlog_items->getTotalAvaialableSize()); |
72 | 77 | } |
73 | 78 | |
79 | + /** |
|
80 | + * @param Planning_Milestone $milestone |
|
81 | + */ |
|
74 | 82 | private function getMilestoneBacklogItems(PFUser $user, $milestone, $strategy) { |
75 | 83 | return $this->backlog_item_collection_factory->getUnplannedOpenCollection($user, $milestone, $strategy, false); |
76 | 84 | } |
@@ -98,7 +98,7 @@ |
||
98 | 98 | * We need to keep list of ids we already looked at so we avoid cycles. |
99 | 99 | * |
100 | 100 | * @param int $backlog_tracker_id |
101 | - * @param array $artifacts |
|
101 | + * @param integer[] $artifacts |
|
102 | 102 | */ |
103 | 103 | private function filterBacklogIds($backlog_tracker_id, array $artifacts) { |
104 | 104 | $artifacts_to_inspect = array(); |
@@ -33,6 +33,10 @@ discard block |
||
33 | 33 | return $this->retrieve($sql); |
34 | 34 | } |
35 | 35 | |
36 | + /** |
|
37 | + * @param integer $kanban_id |
|
38 | + * @param integer $column_id |
|
39 | + */ |
|
36 | 40 | public function setColumnWipLimit($kanban_id, $column_id, $wip_limit) { |
37 | 41 | $kanban_id = $this->da->escapeInt($kanban_id); |
38 | 42 | $column_id = $this->da->escapeInt($column_id); |
@@ -44,6 +48,10 @@ discard block |
||
44 | 48 | return $this->update($sql); |
45 | 49 | } |
46 | 50 | |
51 | + /** |
|
52 | + * @param integer $kanban_id |
|
53 | + * @param integer $column_id |
|
54 | + */ |
|
47 | 55 | public function deleteColumn($kanban_id, $column_id) { |
48 | 56 | $kanban_id = $this->da->escapeInt($kanban_id); |
49 | 57 | $column_id = $this->da->escapeInt($column_id); |
@@ -89,6 +89,9 @@ |
||
89 | 89 | throw new AgileDashboard_KanbanColumnNotFoundException($kanban, $column_id); |
90 | 90 | } |
91 | 91 | |
92 | + /** |
|
93 | + * @param Tracker_FormElement_Field_List_BindValue[] $field_values |
|
94 | + */ |
|
92 | 95 | private function instantiate(AgileDashboard_Kanban $kanban, $id, PFUser $user, $field_values) { |
93 | 96 | return new AgileDashboard_KanbanColumn( |
94 | 97 | $id, |
@@ -40,6 +40,9 @@ discard block |
||
40 | 40 | $this->kanban_actions_checker = $kanban_actions_checker; |
41 | 41 | } |
42 | 42 | |
43 | + /** |
|
44 | + * @param string $label |
|
45 | + */ |
|
43 | 46 | public function createColumn(PFUser $user, AgileDashboard_Kanban $kanban, $label) { |
44 | 47 | $this->kanban_actions_checker->checkUserCanAddColumns($user, $kanban); |
45 | 48 | |
@@ -81,12 +84,18 @@ discard block |
||
81 | 84 | return true; |
82 | 85 | } |
83 | 86 | |
87 | + /** |
|
88 | + * @param integer $wip_limit |
|
89 | + */ |
|
84 | 90 | public function updateWipLimit(PFUser $user, AgileDashboard_Kanban $kanban, AgileDashboard_KanbanColumn $column, $wip_limit) { |
85 | 91 | $this->kanban_actions_checker->checkUserCanAdministrate($user, $kanban); |
86 | 92 | |
87 | 93 | return $this->column_dao->setColumnWipLimit($column->getKanbanId(), $column->getId(), $wip_limit); |
88 | 94 | } |
89 | 95 | |
96 | + /** |
|
97 | + * @param string $label |
|
98 | + */ |
|
90 | 99 | public function updateLabel(PFUser $user, AgileDashboard_Kanban $kanban, AgileDashboard_KanbanColumn $column, $label) { |
91 | 100 | $this->kanban_actions_checker->checkUserCanAdministrate($user, $kanban); |
92 | 101 | $this->kanban_actions_checker->checkUserCanEditColumnLabel($user, $kanban); |
@@ -77,6 +77,10 @@ discard block |
||
77 | 77 | return $this->updateAndGetLastId($sql); |
78 | 78 | } |
79 | 79 | |
80 | + /** |
|
81 | + * @param integer $kanban_id |
|
82 | + * @param string $kanban_name |
|
83 | + */ |
|
80 | 84 | public function save($kanban_id, $kanban_name) { |
81 | 85 | $kanban_id = $this->da->escapeInt($kanban_id); |
82 | 86 | $kanban_name = $this->da->quoteSmart($kanban_name); |
@@ -88,6 +92,9 @@ discard block |
||
88 | 92 | return $this->update($sql); |
89 | 93 | } |
90 | 94 | |
95 | + /** |
|
96 | + * @param string $kanban_id |
|
97 | + */ |
|
91 | 98 | public function delete($kanban_id) { |
92 | 99 | $kanban_id = $this->da->escapeInt($kanban_id); |
93 | 100 | |
@@ -106,6 +113,9 @@ discard block |
||
106 | 113 | $this->commit(); |
107 | 114 | } |
108 | 115 | |
116 | + /** |
|
117 | + * @param integer $tracker_kanban |
|
118 | + */ |
|
109 | 119 | public function getKanbanByTrackerId($tracker_kanban) { |
110 | 120 | $tracker_kanban = $this->da->escapeInt($tracker_kanban); |
111 | 121 |
@@ -21,6 +21,9 @@ discard block |
||
21 | 21 | |
22 | 22 | class AgileDashboard_KanbanItemDao extends DataAccessObject { |
23 | 23 | |
24 | + /** |
|
25 | + * @param integer $tracker_id |
|
26 | + */ |
|
24 | 27 | public function getAllKanbanItemIds($tracker_id) { |
25 | 28 | $tracker_id = $this->da->escapeInt($tracker_id); |
26 | 29 | |
@@ -34,6 +37,7 @@ discard block |
||
34 | 37 | |
35 | 38 | /** |
36 | 39 | * Backlog items for a kanban are artifacts that have no value for the semantic status field |
40 | + * @param integer $tracker_id |
|
37 | 41 | */ |
38 | 42 | public function searchPaginatedBacklogItemsByTrackerId($tracker_id, $limit, $offset) { |
39 | 43 | $tracker_id = $this->da->escapeInt($tracker_id); |
@@ -82,6 +86,7 @@ discard block |
||
82 | 86 | |
83 | 87 | /** |
84 | 88 | * Archived items for a kanban are artifacts that have "closed" value for the semantic status field |
89 | + * @param integer $tracker_id |
|
85 | 90 | */ |
86 | 91 | public function searchPaginatedArchivedItemsByTrackerId($tracker_id, $limit, $offset) { |
87 | 92 | $tracker_id = $this->da->escapeInt($tracker_id); |
@@ -132,6 +137,9 @@ discard block |
||
132 | 137 | return $this->retrieve($sql); |
133 | 138 | } |
134 | 139 | |
140 | + /** |
|
141 | + * @param integer $tracker_id |
|
142 | + */ |
|
135 | 143 | public function searchPaginatedItemsInColumn($tracker_id, $column_id, $limit, $offset) { |
136 | 144 | $tracker_id = $this->da->escapeInt($tracker_id); |
137 | 145 | $column_id = $this->da->escapeInt($column_id); |
@@ -177,6 +185,9 @@ discard block |
||
177 | 185 | return $this->retrieve($sql); |
178 | 186 | } |
179 | 187 | |
188 | + /** |
|
189 | + * @param integer $tracker_id |
|
190 | + */ |
|
180 | 191 | public function getOpenItemIds($tracker_id) { |
181 | 192 | $tracker_id = $this->da->escapeInt($tracker_id); |
182 | 193 | |
@@ -197,6 +208,10 @@ discard block |
||
197 | 208 | return $this->retrieve($sql); |
198 | 209 | } |
199 | 210 | |
211 | + /** |
|
212 | + * @param integer $tracker_id |
|
213 | + * @param integer $item_id |
|
214 | + */ |
|
200 | 215 | public function searchTimeInfoForItem($tracker_id, $item_id) { |
201 | 216 | $tracker_id = $this->da->escapeInt($tracker_id); |
202 | 217 | $item_id = $this->da->escapeInt($item_id); |
@@ -234,7 +249,7 @@ discard block |
||
234 | 249 | * then goes back to Done column at t4, and finally come back at t5. |
235 | 250 | * The returned value is expected to be t5. |
236 | 251 | * |
237 | - * @param type $item_id The archived item id |
|
252 | + * @param integer $item_id The archived item id |
|
238 | 253 | * |
239 | 254 | * @return int|null |
240 | 255 | */ |
@@ -268,6 +283,10 @@ discard block |
||
268 | 283 | return is_array($row) ? (int)$row['submitted_on'] : null; |
269 | 284 | } |
270 | 285 | |
286 | + /** |
|
287 | + * @param integer $tracker_id |
|
288 | + * @param integer $artifact_id |
|
289 | + */ |
|
271 | 290 | public function isKanbanItemInBacklog($tracker_id, $artifact_id) { |
272 | 291 | $tracker_id = $this->da->escapeInt($tracker_id); |
273 | 292 | $artifact_id = $this->da->escapeInt($artifact_id); |
@@ -290,6 +309,10 @@ discard block |
||
290 | 309 | return $this->retrieve($sql); |
291 | 310 | } |
292 | 311 | |
312 | + /** |
|
313 | + * @param integer $tracker_id |
|
314 | + * @param integer $artifact_id |
|
315 | + */ |
|
293 | 316 | public function isKanbanItemInArchive($tracker_id, $artifact_id) { |
294 | 317 | $tracker_id = $this->da->escapeInt($tracker_id); |
295 | 318 | $artifact_id = $this->da->escapeInt($artifact_id); |
@@ -314,6 +337,10 @@ discard block |
||
314 | 337 | return $this->retrieve($sql); |
315 | 338 | } |
316 | 339 | |
340 | + /** |
|
341 | + * @param integer $tracker_id |
|
342 | + * @param integer $artifact_id |
|
343 | + */ |
|
317 | 344 | public function getColumnIdOfKanbanItem($tracker_id, $artifact_id) { |
318 | 345 | $tracker_id = $this->da->escapeInt($tracker_id); |
319 | 346 | $artifact_id = $this->da->escapeInt($artifact_id); |