@@ -49,7 +49,6 @@ |
||
49 | 49 | /** |
50 | 50 | * Trigger jobs corresponding to the Git repository |
51 | 51 | * |
52 | - * @param GitRepository $repository_location Name of the git repository |
|
53 | 52 | */ |
54 | 53 | public function executeForRepository(GitRepository $repository) { |
55 | 54 | if ($repository->getProject()->usesService('hudson')) { |
@@ -57,7 +57,7 @@ |
||
57 | 57 | * Update a local branch from remote |
58 | 58 | * |
59 | 59 | * @param String $branch_name |
60 | - * @return type |
|
60 | + * @return boolean |
|
61 | 61 | */ |
62 | 62 | public function updateRef($branch_name) { |
63 | 63 | return $this->gitCmd("git update-ref refs/heads/$branch_name refs/remotes/$this->remote_name/$branch_name"); |
@@ -26,6 +26,10 @@ |
||
26 | 26 | |
27 | 27 | class Git_Driver_Gerrit_MembershipDao extends DataAccessObject { |
28 | 28 | |
29 | + /** |
|
30 | + * @param integer $group_id |
|
31 | + * @param integer $ugroup_id |
|
32 | + */ |
|
29 | 33 | public function addReference($group_id, $ugroup_id, $remote_server_id) { |
30 | 34 | $group_id = $this->da->escapeInt($group_id); |
31 | 35 | $ugroup_id = $this->da->escapeInt($ugroup_id); |
@@ -310,7 +310,6 @@ |
||
310 | 310 | * Returns gerrit user group uuid |
311 | 311 | * |
312 | 312 | * @param Git_RemoteServer_GerritServer $server |
313 | - * @param String $ugroup |
|
314 | 313 | * @return String |
315 | 314 | * @throws Exception |
316 | 315 | */ |
@@ -84,6 +84,9 @@ discard block |
||
84 | 84 | /** @var Git_Driver_Gerrit_Template_TemplateFactory */ |
85 | 85 | private $template_factory; |
86 | 86 | |
87 | + /** |
|
88 | + * @param string $dir |
|
89 | + */ |
|
87 | 90 | public function __construct( |
88 | 91 | $dir, |
89 | 92 | Git_Driver_Gerrit_GerritDriverFactory $driver_factory, |
@@ -204,6 +207,9 @@ discard block |
||
204 | 207 | $executor->exportBranchesAndTags($gerrit_project_url); |
205 | 208 | } |
206 | 209 | |
210 | + /** |
|
211 | + * @param string $replication_group |
|
212 | + */ |
|
207 | 213 | private function pushFullTuleapAccessRightsToGerrit(GitRepository $repository, Git_RemoteServer_GerritServer $gerrit_server, array $ugroups, $replication_group, $template_id) { |
208 | 214 | foreach ($ugroups as $ugroup) { |
209 | 215 | $this->addGroupToGroupFile($gerrit_server, $repository->getProject()->getUnixName().'/'.$ugroup->getNormalizedName()); |
@@ -263,6 +269,9 @@ discard block |
||
263 | 269 | $this->addGroupDefinitionToGroupFile('global:Registered-Users', self::GROUP_REGISTERED_USERS); |
264 | 270 | } |
265 | 271 | |
272 | + /** |
|
273 | + * @param string $uuid |
|
274 | + */ |
|
266 | 275 | private function addGroupDefinitionToGroupFile($uuid, $group_name) { |
267 | 276 | file_put_contents("$this->dir/groups", "$uuid\t$group_name\n", FILE_APPEND); |
268 | 277 | } |
@@ -24,6 +24,10 @@ |
||
24 | 24 | private $std_out; |
25 | 25 | private $std_err; |
26 | 26 | |
27 | + /** |
|
28 | + * @param string $std_out |
|
29 | + * @param string $std_err |
|
30 | + */ |
|
27 | 31 | function __construct($exit_code, $std_out, $std_err) { |
28 | 32 | parent::__construct(implode(PHP_EOL, array("exit_code: $exit_code", "std_err: $std_err", "std_out: $std_out"))); |
29 | 33 | $this->exit_code = $exit_code; |
@@ -74,7 +74,7 @@ |
||
74 | 74 | /** |
75 | 75 | * @param int $group_id |
76 | 76 | * |
77 | - * @return True if this template belongs to the given project |
|
77 | + * @return boolean if this template belongs to the given project |
|
78 | 78 | */ |
79 | 79 | public function belongsToProject($group_id) { |
80 | 80 | return $this->group_id == $group_id; |
@@ -27,6 +27,9 @@ discard block |
||
27 | 27 | */ |
28 | 28 | class Git_Driver_Gerrit_Template_TemplateDao extends DataAccessObject { |
29 | 29 | |
30 | + /** |
|
31 | + * @param integer $project_id |
|
32 | + */ |
|
30 | 33 | public function getAllTemplatesOfProject($project_id) { |
31 | 34 | $project_id = $this->da->escapeInt($project_id); |
32 | 35 | |
@@ -37,6 +40,9 @@ discard block |
||
37 | 40 | return $this->retrieve($sql); |
38 | 41 | } |
39 | 42 | |
43 | + /** |
|
44 | + * @param integer $template_id |
|
45 | + */ |
|
40 | 46 | public function getTemplate($template_id) { |
41 | 47 | $template_id = $this->da->escapeInt($template_id); |
42 | 48 | |
@@ -47,6 +53,11 @@ discard block |
||
47 | 53 | return $this->retrieve($sql); |
48 | 54 | } |
49 | 55 | |
56 | + /** |
|
57 | + * @param integer $project_id |
|
58 | + * @param string $name |
|
59 | + * @param string $content |
|
60 | + */ |
|
50 | 61 | public function addTemplate($project_id, $name, $content) { |
51 | 62 | $project_id = $this->da->escapeInt($project_id); |
52 | 63 | $name = $this->da->quoteSmart($name); |
@@ -65,6 +76,11 @@ discard block |
||
65 | 76 | return $this->update($sql); |
66 | 77 | } |
67 | 78 | |
79 | + /** |
|
80 | + * @param integer $template_id |
|
81 | + * @param string $name |
|
82 | + * @param string $content |
|
83 | + */ |
|
68 | 84 | public function updateTemplate($template_id, $name, $content) { |
69 | 85 | $template_id = $this->da->escapeInt($template_id); |
70 | 86 | $name = $this->da->quoteSmart($name); |
@@ -77,6 +93,9 @@ discard block |
||
77 | 93 | return $this->update($sql); |
78 | 94 | } |
79 | 95 | |
96 | + /** |
|
97 | + * @param integer $template_id |
|
98 | + */ |
|
80 | 99 | public function deleteTemplate($template_id) { |
81 | 100 | $template_id = $this->da->escapeInt($template_id); |
82 | 101 |
@@ -128,7 +128,7 @@ |
||
128 | 128 | * Instatiate a Template from a SQL row |
129 | 129 | * |
130 | 130 | * @param array |
131 | - * @return Git_Driver_Gerrit_Template_Template[] | false -where the array is in DAR format |
|
131 | + * @return Git_Driver_Gerrit_Template_Template | false -where the array is in DAR format |
|
132 | 132 | */ |
133 | 133 | private function instantiateTemplateFromRow(array $row) { |
134 | 134 | return new Git_Driver_Gerrit_Template_Template( |