@@ -141,6 +141,9 @@ discard block |
||
141 | 141 | ); |
142 | 142 | } |
143 | 143 | |
144 | + /** |
|
145 | + * @param string $tmp_tbl |
|
146 | + */ |
|
144 | 147 | function getTempTableDef($tmp_tbl, $q_sql) { |
145 | 148 | $col_part = preg_replace('/^SELECT\s*(DISTINCT)?(.*)FROM.*$/s', '\\2', $q_sql); |
146 | 149 | $parts = explode(',', $col_part); |
@@ -217,6 +220,9 @@ discard block |
||
217 | 220 | |
218 | 221 | /* */ |
219 | 222 | |
223 | + /** |
|
224 | + * @param integer $id |
|
225 | + */ |
|
220 | 226 | function buildIndex($pattern, $id) { |
221 | 227 | $pattern['id'] = $id; |
222 | 228 | $type = $this->v('type', '', $pattern); |
@@ -407,6 +413,9 @@ discard block |
||
407 | 413 | return $pn['id']; |
408 | 414 | } |
409 | 415 | |
416 | + /** |
|
417 | + * @param string $id |
|
418 | + */ |
|
410 | 419 | function sameOptional($id, $id2) { |
411 | 420 | return $this->getOptionalPattern($id) == $this->getOptionalPattern($id2); |
412 | 421 | } |
@@ -907,6 +916,9 @@ discard block |
||
907 | 916 | |
908 | 917 | /* */ |
909 | 918 | |
919 | + /** |
|
920 | + * @param string $sql |
|
921 | + */ |
|
910 | 922 | function addConstraintSQLEntry($id, $sql) { |
911 | 923 | if (!isset($this->index['constraints'][$id])) { |
912 | 924 | $this->index['constraints'][$id] = array(); |
@@ -1464,6 +1476,9 @@ discard block |
||
1464 | 1476 | return $tbl_alias . ' IS NOT NULL'; |
1465 | 1477 | } |
1466 | 1478 | |
1479 | + /** |
|
1480 | + * @param integer $type |
|
1481 | + */ |
|
1467 | 1482 | function getHasTypeCallSQL($pattern, $context, $type) { |
1468 | 1483 | $r = ''; |
1469 | 1484 | $var = $pattern['args'][0]['value']; |
@@ -23,6 +23,9 @@ |
||
23 | 23 | return new RBACEngine(); |
24 | 24 | } |
25 | 25 | |
26 | + /** |
|
27 | + * @param PFUser|null $user_obj |
|
28 | + */ |
|
26 | 29 | function getAvailableRolesForUser($user_obj) { |
27 | 30 | return array(); |
28 | 31 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @param string The unix username - required |
27 | 27 | * @param int The result set handle ("SELECT * FROM USERS WHERE user_id=xx") |
28 | - * @return a user object or false on failure |
|
28 | + * @return PFUser|null user object or false on failure |
|
29 | 29 | */ |
30 | 30 | function user_get_object_by_name($user_name, $res = false) { |
31 | 31 | return UserManager::instance()->getUserByIdentifier($user_name); |
@@ -108,7 +108,7 @@ |
||
108 | 108 | |
109 | 109 | /** |
110 | 110 | * Create a HTML link to a project's page |
111 | - * @param string $groupame |
|
111 | + * @param string $groupname |
|
112 | 112 | * @param int $group_id |
113 | 113 | * @param string $text |
114 | 114 | * @return string |
@@ -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(); |