@@ -99,12 +99,18 @@ |
||
99 | 99 | var $default_values = array(); |
100 | 100 | var $global = false; |
101 | 101 | |
102 | + /** |
|
103 | + * @param string $name |
|
104 | + */ |
|
102 | 105 | function PluginSpecificRoleSetting(&$role, $name, $global = false) { |
103 | 106 | $this->global = $global; |
104 | 107 | $this->role =& $role; |
105 | 108 | $this->name = $name; |
106 | 109 | } |
107 | 110 | |
111 | + /** |
|
112 | + * @param string[] $values |
|
113 | + */ |
|
108 | 114 | function SetAllowedValues($values) { |
109 | 115 | $this->role->role_values = array_replace_recursive($this->role->role_values, |
110 | 116 | array($this->name => $values)); |
@@ -75,6 +75,10 @@ discard block |
||
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
78 | + /** |
|
79 | + * @param string $sysevent_prefix |
|
80 | + * @param string $log_prefix |
|
81 | + */ |
|
78 | 82 | private function logError($sysevent_prefix, $log_prefix, Exception $e) { |
79 | 83 | $this->error($sysevent_prefix . $e->getMessage()); |
80 | 84 | $this->logger->error($log_prefix . $this->verbalizeParameters(null), $e); |
@@ -99,6 +103,10 @@ discard block |
||
99 | 103 | } |
100 | 104 | } |
101 | 105 | |
106 | + /** |
|
107 | + * @param integer $repo_id |
|
108 | + * @param boolean $with_link |
|
109 | + */ |
|
102 | 110 | private function verbalizeRepoId($repo_id, $with_link) { |
103 | 111 | $txt = '#'. $repo_id; |
104 | 112 | if ($with_link) { |
@@ -111,6 +119,10 @@ discard block |
||
111 | 119 | return $txt; |
112 | 120 | } |
113 | 121 | |
122 | + /** |
|
123 | + * @param integer $remote_server_id |
|
124 | + * @param boolean $with_link |
|
125 | + */ |
|
114 | 126 | private function verbalizeRemoteServerId($remote_server_id, $with_link) { |
115 | 127 | $txt = '#'. $remote_server_id; |
116 | 128 | if ($with_link) { |
@@ -22,6 +22,9 @@ |
||
22 | 22 | |
23 | 23 | class GitAuthorizedKeysFileException extends Exception { |
24 | 24 | |
25 | + /** |
|
26 | + * @param string $authorized_keys_file |
|
27 | + */ |
|
25 | 28 | public function __construct($authorized_keys_file) { |
26 | 29 | parent::__construct($authorized_keys_file.' is empty'. |
27 | 30 | '. In order to retrieve a file with the gitolite admin public key, run the script : ' |
@@ -26,6 +26,9 @@ |
||
26 | 26 | class GitRepositoryException extends Exception { |
27 | 27 | //put your code here |
28 | 28 | |
29 | + /** |
|
30 | + * @param string $msg |
|
31 | + */ |
|
29 | 32 | public function __construct($msg) { |
30 | 33 | parent::__construct(__CLASS__.' : '.$msg); |
31 | 34 | } |
@@ -292,6 +292,9 @@ discard block |
||
292 | 292 | $this->request->set('repo_id', $repository->getId()); |
293 | 293 | } |
294 | 294 | |
295 | + /** |
|
296 | + * @param string $parameters |
|
297 | + */ |
|
295 | 298 | private function redirectIfTryingToViewRepositoryAndUserFriendlyURLsActivated( |
296 | 299 | Project $project, |
297 | 300 | GitRepository $repository, |
@@ -339,6 +342,11 @@ discard block |
||
339 | 342 | $this->permittedActions = $permittedActions; |
340 | 343 | } |
341 | 344 | |
345 | + /** |
|
346 | + * @param string $key |
|
347 | + * |
|
348 | + * @return string |
|
349 | + */ |
|
342 | 350 | protected function getText($key, $params = array()) { |
343 | 351 | return $GLOBALS['Language']->getText('plugin_git', $key, $params); |
344 | 352 | } |
@@ -350,6 +358,9 @@ discard block |
||
350 | 358 | return $this->plugin; |
351 | 359 | } |
352 | 360 | |
361 | + /** |
|
362 | + * @param PFUser $user |
|
363 | + */ |
|
353 | 364 | protected function definePermittedActions($repoId, $user) { |
354 | 365 | if ($this->permissions_manager->userIsGitAdmin($user, $this->projectManager->getProject($this->groupId))) { |
355 | 366 | $this->permittedActions = array( |
@@ -441,6 +452,10 @@ discard block |
||
441 | 452 | |
442 | 453 | } |
443 | 454 | |
455 | + /** |
|
456 | + * @param string|null $repositoryName |
|
457 | + * @param PFUser $user |
|
458 | + */ |
|
444 | 459 | public function _dispatchActionAndView($action, $repoId, $repositoryName, $user) { |
445 | 460 | $pane = $this->request->get('pane'); |
446 | 461 | switch ($action) { |
@@ -803,6 +818,9 @@ discard block |
||
803 | 818 | } |
804 | 819 | } |
805 | 820 | |
821 | + /** |
|
822 | + * @param GitRepository|null $repository |
|
823 | + */ |
|
806 | 824 | private function getValidatedGerritTemplateId($repository) { |
807 | 825 | if (empty($repository)) { |
808 | 826 | return null; |
@@ -970,6 +988,9 @@ discard block |
||
970 | 988 | } |
971 | 989 | } |
972 | 990 | |
991 | + /** |
|
992 | + * @param string $url |
|
993 | + */ |
|
973 | 994 | protected function checkSynchronizerToken($url) { |
974 | 995 | $token = new CSRFSynchronizerToken($url); |
975 | 996 | $token->check(); |
@@ -157,6 +157,9 @@ discard block |
||
157 | 157 | ); |
158 | 158 | } |
159 | 159 | |
160 | + /** |
|
161 | + * @param Codendi_Request $request |
|
162 | + */ |
|
160 | 163 | private function setMirrorRestriction($request) { |
161 | 164 | $mirror_id = $request->get('mirror_id'); |
162 | 165 | $mirror = $this->git_mirror_mapper->fetch($mirror_id); |
@@ -193,6 +196,9 @@ discard block |
||
193 | 196 | return "/admin/system_events/?queue=git"; |
194 | 197 | } |
195 | 198 | |
199 | + /** |
|
200 | + * @param Codendi_Request $request |
|
201 | + */ |
|
196 | 202 | private function updateAllowedProjectList($request) { |
197 | 203 | $mirror_id = $request->get('mirror_id'); |
198 | 204 | $mirror = $this->git_mirror_mapper->fetch($mirror_id); |
@@ -231,6 +237,9 @@ discard block |
||
231 | 237 | $GLOBALS['Response']->redirect('/plugins/git/admin/?pane=mirrors_admin&action=manage-allowed-projects&mirror_id=' . $mirror->id); |
232 | 238 | } |
233 | 239 | |
240 | + /** |
|
241 | + * @param string $url |
|
242 | + */ |
|
234 | 243 | private function checkSynchronizerToken($url) { |
235 | 244 | $token = new CSRFSynchronizerToken($url); |
236 | 245 | $token->check(); |
@@ -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); |