@@ -37,7 +37,7 @@ |
||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | - * @param Tracker $tracker |
|
| 40 | + * @param Tracker $tracker_id |
|
| 41 | 41 | * |
| 42 | 42 | * @return \Cardwall_OnTop_Config |
| 43 | 43 | */ |
@@ -41,6 +41,9 @@ discard block |
||
| 41 | 41 | return $this->update($sql); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | + /** |
|
| 45 | + * @param integer $tracker_id |
|
| 46 | + */ |
|
| 44 | 47 | public function disable($tracker_id) { |
| 45 | 48 | $tracker_id = $this->da->escapeInt($tracker_id); |
| 46 | 49 | $sql = "DELETE FROM plugin_cardwall_on_top |
@@ -49,6 +52,7 @@ discard block |
||
| 49 | 52 | } |
| 50 | 53 | |
| 51 | 54 | /** |
| 55 | + * @param integer $tracker_id |
|
| 52 | 56 | * @return boolean |
| 53 | 57 | */ |
| 54 | 58 | public function isFreestyleEnabled($tracker_id) { |
@@ -66,10 +70,16 @@ discard block |
||
| 66 | 70 | return $this->updateFreestyleColumns($tracker_id, 1); |
| 67 | 71 | } |
| 68 | 72 | |
| 73 | + /** |
|
| 74 | + * @param integer $tracker_id |
|
| 75 | + */ |
|
| 69 | 76 | public function disableFreestyleColumns($tracker_id) { |
| 70 | 77 | return $this->updateFreestyleColumns($tracker_id, 0); |
| 71 | 78 | } |
| 72 | 79 | |
| 80 | + /** |
|
| 81 | + * @param integer $value |
|
| 82 | + */ |
|
| 73 | 83 | private function updateFreestyleColumns($tracker_id, $value) { |
| 74 | 84 | $tracker_id = $this->da->escapeInt($tracker_id); |
| 75 | 85 | $value = $this->da->escapeInt($value); |
@@ -24,12 +24,24 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | interface Cardwall_OnTop_IConfig { |
| 26 | 26 | |
| 27 | + /** |
|
| 28 | + * @return Tracker|null |
|
| 29 | + */ |
|
| 27 | 30 | public function getTracker(); |
| 28 | 31 | |
| 32 | + /** |
|
| 33 | + * @return boolean |
|
| 34 | + */ |
|
| 29 | 35 | public function isEnabled(); |
| 30 | 36 | |
| 37 | + /** |
|
| 38 | + * @return boolean |
|
| 39 | + */ |
|
| 31 | 40 | public function enable(); |
| 32 | 41 | |
| 42 | + /** |
|
| 43 | + * @return boolean |
|
| 44 | + */ |
|
| 33 | 45 | public function disable(); |
| 34 | 46 | |
| 35 | 47 | public function getDashboardColumns(); |
@@ -40,14 +52,23 @@ discard block |
||
| 40 | 52 | |
| 41 | 53 | public function getTrackers(); |
| 42 | 54 | |
| 55 | + /** |
|
| 56 | + * @return Cardwall_OnTop_Config_TrackerMapping|null |
|
| 57 | + */ |
|
| 43 | 58 | public function getMappingFor(Tracker $mapping_tracker); |
| 44 | 59 | |
| 60 | + /** |
|
| 61 | + * @return boolean |
|
| 62 | + */ |
|
| 45 | 63 | public function isInColumn(Tracker_Artifact $artifact, |
| 46 | 64 | Cardwall_FieldProviders_IProvideFieldGivenAnArtifact $field_provider, |
| 47 | 65 | Cardwall_Column $column); |
| 48 | 66 | |
| 49 | 67 | public function getCardwallMappings(array $fields, Cardwall_OnTop_Config_ColumnCollection $cardwall_columns); |
| 50 | 68 | |
| 69 | + /** |
|
| 70 | + * @return void |
|
| 71 | + */ |
|
| 51 | 72 | public function fillMappingsWithOnTopMappings(Cardwall_MappingCollection $mappings, |
| 52 | 73 | Cardwall_OnTop_Config_ColumnCollection $columns); |
| 53 | 74 | } |
@@ -143,6 +143,9 @@ |
||
| 143 | 143 | return $this->returnRelevantProgressBarValue($completion); |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | + /** |
|
| 147 | + * @param double $value |
|
| 148 | + */ |
|
| 146 | 149 | private function returnRelevantProgressBarValue($value) { |
| 147 | 150 | if ($value < 0) { |
| 148 | 151 | return 0; |
@@ -96,6 +96,9 @@ |
||
| 96 | 96 | ); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | + /** |
|
| 100 | + * @param Cardwall_FieldProviders_IProvideFieldGivenAnArtifact $field_provider |
|
| 101 | + */ |
|
| 99 | 102 | private function getIndexedStatusFieldsOf(array $trackers, $field_provider) { |
| 100 | 103 | $status_fields = array(); |
| 101 | 104 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | * |
| 40 | 40 | * @param array $artifact_ids |
| 41 | 41 | * @param Cardwall_OnTop_Config_ColumnCollection $columns |
| 42 | - * @param Cardwall_MappingCollection $mappings_collection |
|
| 42 | + * @param Cardwall_MappingCollection $mapping_collection |
|
| 43 | 43 | * @return \Cardwall_Board |
| 44 | 44 | */ |
| 45 | 45 | public function getBoard(array $artifact_ids, Cardwall_OnTop_Config_ColumnCollection $columns, Cardwall_MappingCollection $mapping_collection) { |
@@ -50,9 +50,8 @@ |
||
| 50 | 50 | * |
| 51 | 51 | * @url GET {id}/cardwall |
| 52 | 52 | * |
| 53 | - * @param int $id Id of the milestone |
|
| 54 | 53 | * |
| 55 | - * @return \Tuleap\Cardwall\REST\v1\MilestonesCardwallRepresentation |
|
| 54 | + * @return \AgileDashboard_MilestonesCardwallRepresentation |
|
| 56 | 55 | * |
| 57 | 56 | * @throws 403 |
| 58 | 57 | * @throws 404 |
@@ -45,6 +45,9 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | + * @param integer $tracker_id |
|
| 49 | + * @param integer $field_id |
|
| 50 | + * @param string $rank |
|
| 48 | 51 | * @return boolean true if success |
| 49 | 52 | */ |
| 50 | 53 | public function add($tracker_id, $field_id, $rank) { |
@@ -59,6 +62,8 @@ discard block |
||
| 59 | 62 | |
| 60 | 63 | |
| 61 | 64 | /** |
| 65 | + * @param integer $tracker_id |
|
| 66 | + * @param integer $field_id |
|
| 62 | 67 | * @return boolean true if success |
| 63 | 68 | */ |
| 64 | 69 | public function remove($tracker_id, $field_id) { |
@@ -51,9 +51,8 @@ discard block |
||
| 51 | 51 | /** |
| 52 | 52 | * Return a new card controller |
| 53 | 53 | * |
| 54 | - * @param Codendi_Request $request |
|
| 55 | 54 | * |
| 56 | - * @return Cardwall_CardController |
|
| 55 | + * @return Cardwall_SingleCard |
|
| 57 | 56 | * |
| 58 | 57 | * @throws Exception |
| 59 | 58 | */ |
@@ -78,6 +77,7 @@ discard block |
||
| 78 | 77 | } |
| 79 | 78 | |
| 80 | 79 | /** |
| 80 | + * @param Cardwall_CardInCellPresenterFactory $presenter_factory |
|
| 81 | 81 | * @return Cardwall_CardInCellPresenter |
| 82 | 82 | */ |
| 83 | 83 | protected function getCardInCellPresenter($presenter_factory, PFUser $user, Tracker_Artifact $artifact, Cardwall_CardFields $card_fields, Cardwall_UserPreferences_UserPreferencesDisplayUser $display_preferences) { |