@@ -125,6 +125,8 @@ discard block |
||
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | /** |
| 128 | + * @param Codendi_Request $request |
|
| 129 | + * @param AgileDashboard_Milestone_Pane_PanePresenterBuilderFactory $pane_presenter_builder_factory |
|
| 128 | 130 | * @return Planning_VirtualTopMilestonePaneFactory |
| 129 | 131 | */ |
| 130 | 132 | private function getTopMilestonePaneFactory( |
@@ -143,6 +145,10 @@ discard block |
||
| 143 | 145 | ); |
| 144 | 146 | } |
| 145 | 147 | |
| 148 | + /** |
|
| 149 | + * @param Planning_MilestoneFactory $milestone_factory |
|
| 150 | + * @param AgileDashboard_PaneInfoFactory $pane_info_factory |
|
| 151 | + */ |
|
| 146 | 152 | private function getPanePresenterBuilderFactory($milestone_factory, $pane_info_factory) { |
| 147 | 153 | $icon_factory = new AgileDashboard_PaneIconLinkPresenterCollectionFactory($pane_info_factory); |
| 148 | 154 | |
@@ -72,6 +72,9 @@ |
||
| 72 | 72 | return $source_artifact; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | + /** |
|
| 76 | + * @param string $key |
|
| 77 | + */ |
|
| 75 | 78 | private function getSourceArtifact(Codendi_Request $request, $key) { |
| 76 | 79 | $artifact_id = (int) $request->getValidated($key, 'uint', 0); |
| 77 | 80 | return $this->artifact_factory->getArtifactById($artifact_id); |
@@ -223,6 +223,10 @@ discard block |
||
| 223 | 223 | return $artifacts; |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | + /** |
|
| 227 | + * @param Tracker_Artifact[] $artifacts |
|
| 228 | + * @param PFUser $user |
|
| 229 | + */ |
|
| 226 | 230 | private function addChildrenNodes(ArtifactNode $root_node, &$artifacts, $user) { |
| 227 | 231 | foreach ($root_node->getChildren() as $node) { |
| 228 | 232 | $artifact = $node->getObject(); |
@@ -307,7 +311,7 @@ discard block |
||
| 307 | 311 | /** |
| 308 | 312 | * @param array $artifacts_ids |
| 309 | 313 | * @param PFUser $user |
| 310 | - * @return Boolean True if nothing went wrong |
|
| 314 | + * @return boolean|null True if nothing went wrong |
|
| 311 | 315 | */ |
| 312 | 316 | public function solveInconsistencies(PFUser $user, array $artifacts_ids) { |
| 313 | 317 | $success = true; |
@@ -327,7 +331,7 @@ discard block |
||
| 327 | 331 | |
| 328 | 332 | /** |
| 329 | 333 | * @see Planning_Milestone::getDuration() |
| 330 | - * @return float |
|
| 334 | + * @return integer |
|
| 331 | 335 | */ |
| 332 | 336 | public function getDuration() { |
| 333 | 337 | return $this->duration; |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | * - pass $request to actions (e.g. show). |
| 52 | 52 | * |
| 53 | 53 | * @param Codendi_Request $request |
| 54 | - * @param PlanningFactory $planning_factory |
|
| 54 | + * @param PlanningFactory $pane_factory |
|
| 55 | 55 | * @param Planning_MilestoneFactory $milestone_factory |
| 56 | 56 | */ |
| 57 | 57 | public function __construct( |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | * |
| 84 | 84 | * @param Codendi_Request $request |
| 85 | 85 | * |
| 86 | - * @return Planning_MilestoneController |
|
| 86 | + * @return Planning_VirtualTopMilestoneController |
|
| 87 | 87 | */ |
| 88 | 88 | public function getVirtualTopMilestoneController(Codendi_Request $request) { |
| 89 | 89 | return new Planning_VirtualTopMilestoneController( |
@@ -102,6 +102,8 @@ discard block |
||
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
| 105 | + * @param integer $offset |
|
| 106 | + * @param integer $number_to_fetch |
|
| 105 | 107 | * @return array of Planning_Milestone (the last $number_to_fetch open ones for the given $planning) |
| 106 | 108 | */ |
| 107 | 109 | public function getLastOpenMilestones(PFUser $user, Planning $planning, $offset, $number_to_fetch) { |
@@ -132,7 +134,7 @@ discard block |
||
| 132 | 134 | * @param PFUser $user |
| 133 | 135 | * @param Integer $artifact_id |
| 134 | 136 | * |
| 135 | - * @return Planning_Milestone|null |
|
| 137 | + * @return Planning_ArtifactMilestone|null |
|
| 136 | 138 | */ |
| 137 | 139 | public function getBareMilestoneByArtifactId(PFUser $user, $artifact_id) { |
| 138 | 140 | $artifact = $this->artifact_factory->getArtifactById($artifact_id); |
@@ -148,7 +150,7 @@ discard block |
||
| 148 | 150 | * @param PFUser $user |
| 149 | 151 | * @param Integer $artifact_id |
| 150 | 152 | * |
| 151 | - * @return Planning_Milestone|null |
|
| 153 | + * @return null|Planning_ArtifactMilestone |
|
| 152 | 154 | */ |
| 153 | 155 | public function getValidatedBareMilestoneByArtifactId(PFUser $user, $artifact_id) { |
| 154 | 156 | $artifact = $this->artifact_factory->getArtifactById($artifact_id); |
@@ -164,7 +166,7 @@ discard block |
||
| 164 | 166 | /** |
| 165 | 167 | * @param PFUser $user |
| 166 | 168 | * @param Tracker_Artifact $artifact |
| 167 | - * @return Planning_Milestone|null |
|
| 169 | + * @return Planning_ArtifactMilestone|null |
|
| 168 | 170 | */ |
| 169 | 171 | public function getBareMilestoneByArtifact(PFUser $user, Tracker_Artifact $artifact) { |
| 170 | 172 | $tracker = $artifact->getTracker(); |
@@ -297,10 +299,9 @@ discard block |
||
| 297 | 299 | * Retrieves the artifacts planned for the given milestone artifact. |
| 298 | 300 | * |
| 299 | 301 | * @param PFUser $user |
| 300 | - * @param Planning $planning |
|
| 301 | 302 | * @param Tracker_Artifact $milestone_artifact |
| 302 | 303 | * |
| 303 | - * @return TreeNode |
|
| 304 | + * @return null|ArtifactNode |
|
| 304 | 305 | */ |
| 305 | 306 | public function getPlannedArtifacts(PFUser $user, |
| 306 | 307 | Tracker_Artifact $milestone_artifact) { |
@@ -315,12 +316,12 @@ discard block |
||
| 315 | 316 | /** |
| 316 | 317 | * Adds $parent_node children according to $artifact ones. |
| 317 | 318 | * |
| 318 | - * @param type $user |
|
| 319 | - * @param type $artifact |
|
| 320 | - * @param type $parent_node |
|
| 319 | + * @param PFUser $user |
|
| 320 | + * @param Tracker_Artifact $artifact |
|
| 321 | + * @param TreeNode $parent_node |
|
| 321 | 322 | * @param type $parents The list of parents to prevent infinite recursion |
| 322 | 323 | * |
| 323 | - * @return boolean |
|
| 324 | + * @return false|null |
|
| 324 | 325 | */ |
| 325 | 326 | private function addChildrenPlannedArtifacts(PFUser $user, |
| 326 | 327 | Tracker_Artifact $artifact, |
@@ -337,6 +338,10 @@ discard block |
||
| 337 | 338 | } |
| 338 | 339 | } |
| 339 | 340 | |
| 341 | + /** |
|
| 342 | + * @param PFUser $user |
|
| 343 | + * @param Tracker_Artifact $artifact |
|
| 344 | + */ |
|
| 340 | 345 | private function makeNodeWithChildren($user, $artifact, $parents) { |
| 341 | 346 | $node = new ArtifactNode($artifact); |
| 342 | 347 | $this->addChildrenPlannedArtifacts($user, $artifact, $node, $parents); |
@@ -599,7 +604,7 @@ discard block |
||
| 599 | 604 | /** |
| 600 | 605 | * Create Milestones corresponding to an array of artifacts |
| 601 | 606 | * |
| 602 | - * @param Tracker_Artifact[] $artifact |
|
| 607 | + * @param Tracker_Artifact[] $artifacts |
|
| 603 | 608 | * |
| 604 | 609 | * @return Planning_ArtifactMilestone[] |
| 605 | 610 | */ |
@@ -741,6 +746,7 @@ discard block |
||
| 741 | 746 | /** |
| 742 | 747 | * Returns the last $quantity milestones - ordered by oldest first |
| 743 | 748 | * |
| 749 | + * @param integer $quantity |
|
| 744 | 750 | * @return Planning_Milestone[] |
| 745 | 751 | */ |
| 746 | 752 | public function getPastMilestones(PFUser $user, Planning $planning, $quantity) { |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | return $this->active_pane[$milestone->getArtifactId()]; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - /** @return AgileDashboard_PaneInfo[] */ |
|
| 106 | + /** @return AgileDashboard_PaneInfo */ |
|
| 107 | 107 | public function getListOfPaneInfo(Planning_Milestone $milestone) { |
| 108 | 108 | if (! isset($this->list_of_pane_info[$milestone->getArtifactId()])) { |
| 109 | 109 | $this->buildListOfPaneInfo($milestone); |
@@ -51,6 +51,9 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | private $presenter_data; |
| 53 | 53 | |
| 54 | + /** |
|
| 55 | + * @param string $planning_redirect_to_new |
|
| 56 | + */ |
|
| 54 | 57 | public function __construct( |
| 55 | 58 | Planning_Milestone $milestone, |
| 56 | 59 | PFUser $current_user, |
@@ -111,7 +114,7 @@ discard block |
||
| 111 | 114 | } |
| 112 | 115 | |
| 113 | 116 | /** |
| 114 | - * @return array |
|
| 117 | + * @return AgileDashboard_PaneInfo[] |
|
| 115 | 118 | */ |
| 116 | 119 | public function getPaneInfoList() { |
| 117 | 120 | return $this->presenter_data->getListOfPaneInfo(); |
@@ -140,6 +143,9 @@ discard block |
||
| 140 | 143 | return $start_date && $end_date; |
| 141 | 144 | } |
| 142 | 145 | |
| 146 | + /** |
|
| 147 | + * @param integer $date |
|
| 148 | + */ |
|
| 143 | 149 | private function formatDate($date) { |
| 144 | 150 | return date($GLOBALS['Language']->getText('system', 'datefmt_day_and_month'), $date); |
| 145 | 151 | } |
@@ -32,7 +32,8 @@ |
||
| 32 | 32 | return "planning[$pane_identifier][$planning_id]=$artifact_id"; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - /** @return string */ |
|
| 35 | + /** @param string $pane_identifier |
|
| 36 | +/** @return string */ |
|
| 36 | 37 | public function getPlanningRedirectToNew(Planning_Milestone $milestone, $pane_identifier) { |
| 37 | 38 | $planning_id = (int) $milestone->getPlanningId(); |
| 38 | 39 | |