@@ -26,6 +26,9 @@ |
||
26 | 26 | |
27 | 27 | abstract class GitViewsRepositoriesTraversalStrategyTest extends TuleapTestCase { |
28 | 28 | |
29 | + /** |
|
30 | + * @param string $classname |
|
31 | + */ |
|
29 | 32 | public function __construct($classname) { |
30 | 33 | parent::__construct(); |
31 | 34 | $this->classname = $classname; |
@@ -86,6 +86,9 @@ discard block |
||
86 | 86 | |
87 | 87 | } |
88 | 88 | |
89 | + /** |
|
90 | + * @param string $unixName |
|
91 | + */ |
|
89 | 92 | private function GivenAProject($id, $name, $unixName = null, $useGit = true) { |
90 | 93 | $project = new MockProject(); |
91 | 94 | $project->setReturnValue('getId', $id); |
@@ -95,6 +98,10 @@ discard block |
||
95 | 98 | return $project; |
96 | 99 | } |
97 | 100 | |
101 | + /** |
|
102 | + * @param string $id |
|
103 | + * @param string $name |
|
104 | + */ |
|
98 | 105 | private function GivenAProjectWithoutGitService($id, $name) { |
99 | 106 | return $this->GivenAProject($id, $name, null, false); |
100 | 107 | } |
@@ -34,6 +34,9 @@ discard block |
||
34 | 34 | $this->table_name = 'plugin_graphontrackers_chart'; |
35 | 35 | } |
36 | 36 | |
37 | + /** |
|
38 | + * @param string $report_id |
|
39 | + */ |
|
37 | 40 | public function searchByReportId($report_id) { |
38 | 41 | $sql = "SELECT * FROM plugin_graphontrackers_chart WHERE report_graphic_id = "; |
39 | 42 | $sql .= $this->da->escapeInt($report_id); |
@@ -53,6 +56,11 @@ discard block |
||
53 | 56 | return $this->update($sql); |
54 | 57 | } |
55 | 58 | |
59 | + /** |
|
60 | + * @param string $report_id |
|
61 | + * @param string $title |
|
62 | + * @param string $description |
|
63 | + */ |
|
56 | 64 | public function create($report_id, $chart_type, $title, $description, $width, $height) { |
57 | 65 | $rank = $this->prepareRanking(0, $report_id, 'beginning', 'id', 'report_graphic_id'); |
58 | 66 | $sql = sprintf("INSERT INTO plugin_graphontrackers_chart(report_graphic_id, rank, chart_type, title, description, width, height) VALUES (%d, %d, %s, %s, %s, %d, %d)", |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | /** |
68 | 68 | * getter method to set report_graphic_id |
69 | - * @return null |
|
69 | + * @return string |
|
70 | 70 | */ |
71 | 71 | |
72 | 72 | function getId() { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | /** |
117 | 117 | * getter method to get graphic report scope |
118 | 118 | * |
119 | - * @return int scope : the graphic report scope (Personal,Project) |
|
119 | + * @return string scope : the graphic report scope (Personal,Project) |
|
120 | 120 | */ |
121 | 121 | |
122 | 122 | function getScope() { |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | /** |
137 | 137 | * getter method to get graphic report artifact group identifier |
138 | 138 | * |
139 | - * @return int group_artifact_id : tracker type |
|
139 | + * @return string group_artifact_id : tracker type |
|
140 | 140 | */ |
141 | 141 | |
142 | 142 | function getGroup_artifact_id() { |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | /** |
162 | 162 | * getter method to get user identifier |
163 | 163 | * |
164 | - * @return int user_id : the user identifier |
|
164 | + * @return string user_id : the user identifier |
|
165 | 165 | */ |
166 | 166 | function getUserId() { |
167 | 167 | return $this->user_id; |
@@ -170,6 +170,7 @@ discard block |
||
170 | 170 | /** |
171 | 171 | * setter method to set user identifier |
172 | 172 | * @param int user_id: the user identifier |
173 | + * @param integer $user_id |
|
173 | 174 | */ |
174 | 175 | |
175 | 176 | function setUserId($user_id) { |
@@ -203,6 +204,7 @@ discard block |
||
203 | 204 | * |
204 | 205 | * param scope: the scope code |
205 | 206 | * |
207 | + * @param string $scope |
|
206 | 208 | * @return string |
207 | 209 | */ |
208 | 210 | |
@@ -277,7 +279,8 @@ discard block |
||
277 | 279 | * |
278 | 280 | * @param string The report name. |
279 | 281 | * @param string The report description. |
280 | - * @return id on success, false on failure. |
|
282 | + * @param integer $user_id |
|
283 | + * @return GraphOnTrackers_Report|null on success, false on failure. |
|
281 | 284 | */ |
282 | 285 | public static function create($atid, $user_id, $name, $description, $scope) { |
283 | 286 | $sql = sprintf("INSERT INTO plugin_graphontrackers_report_graphic |
@@ -25,6 +25,10 @@ |
||
25 | 25 | * Data Access Object for GraphOnTrackers_Report |
26 | 26 | */ |
27 | 27 | class GraphOnTrackers_ReportDao extends DataAccessObject { |
28 | + |
|
29 | + /** |
|
30 | + * @param string $scope |
|
31 | + */ |
|
28 | 32 | public function searchByTrackerIdAndScope($tracker_id, $scope) { |
29 | 33 | $sql = "SELECT * FROM plugin_graphontrackers_report_graphic WHERE group_artifact_id = "; |
30 | 34 | $sql .= $this->da->escapeInt($tracker_id); |
@@ -44,6 +44,8 @@ |
||
44 | 44 | |
45 | 45 | /** |
46 | 46 | * Copy the charts from Report $from_report to Report $to_report |
47 | + * @param GraphOnTrackers_Report $from_report |
|
48 | + * @param GraphOnTrackers_Report|null $to_report |
|
47 | 49 | */ |
48 | 50 | public function copyCharts($from_report, $to_report) { |
49 | 51 | foreach($from_report->getCharts() as $c) { |
@@ -166,6 +166,7 @@ |
||
166 | 166 | |
167 | 167 | /** |
168 | 168 | * Fill engine object with database results depending of data type |
169 | + * @param string $type |
|
169 | 170 | */ |
170 | 171 | protected function _fillEngineData($res, $engine, $type) { |
171 | 172 | if ($res && !db_error($res)) { |
@@ -93,6 +93,9 @@ |
||
93 | 93 | return $this->graph; |
94 | 94 | } |
95 | 95 | |
96 | + /** |
|
97 | + * @param string $color |
|
98 | + */ |
|
96 | 99 | function getBarPlot($data, $color) { |
97 | 100 | $b = new BarPlot($data); |
98 | 101 | //parameters hard coded for the moment |
@@ -24,6 +24,9 @@ |
||
24 | 24 | |
25 | 25 | class GraphOnTrackersPluginInfo extends PluginInfo { |
26 | 26 | |
27 | + /** |
|
28 | + * @param GraphOnTrackersPlugin $plugin |
|
29 | + */ |
|
27 | 30 | function GraphOnTrackersPluginInfo(&$plugin) { |
28 | 31 | $this->PluginInfo($plugin); |
29 | 32 | $this->setPluginDescriptor(new GraphOnTrackersPluginDescriptor()); |