@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | /** |
59 | 59 | * Display access control management for gitshell backend |
60 | 60 | * |
61 | - * @return void |
|
61 | + * @return string |
|
62 | 62 | */ |
63 | 63 | private function accessControl() { |
64 | 64 | $html = ''; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | /** |
86 | 86 | * Display access control management for gitolite backend |
87 | 87 | * |
88 | - * @return void |
|
88 | + * @return string |
|
89 | 89 | */ |
90 | 90 | private function accessControlGitolite() { |
91 | 91 | $forkPermissionsManager = new GitForkPermissionsManager($this->repository); |
@@ -199,8 +199,9 @@ |
||
199 | 199 | /** |
200 | 200 | * Fetch the html code to display the icon of a repository (depends on type of project) |
201 | 201 | * |
202 | - * @param $access |
|
202 | + * @param string $access |
|
203 | 203 | * @param $backend_type |
204 | + * @param boolean $backendIsGitolite |
|
204 | 205 | */ |
205 | 206 | private function getAccessType($access, $backendIsGitolite) { |
206 | 207 | if ($backendIsGitolite) { |
@@ -34,7 +34,6 @@ discard block |
||
34 | 34 | /** |
35 | 35 | * Constructor |
36 | 36 | * |
37 | - * @param GitViews $view The GitViews |
|
38 | 37 | */ |
39 | 38 | public function __construct($lastPushes, Git_GitRepositoryUrlManager $url_manager) { |
40 | 39 | parent::__construct(); |
@@ -133,6 +132,9 @@ discard block |
||
133 | 132 | return $html; |
134 | 133 | } |
135 | 134 | |
135 | + /** |
|
136 | + * @param integer $depth |
|
137 | + */ |
|
136 | 138 | protected function fetchRows($repositories, $depth) { |
137 | 139 | $nodeHtml = ''; |
138 | 140 | $leavesHtml = ''; |
@@ -175,6 +177,10 @@ discard block |
||
175 | 177 | return $html; |
176 | 178 | } |
177 | 179 | |
180 | + /** |
|
181 | + * @param string $class |
|
182 | + * @param string $description |
|
183 | + */ |
|
178 | 184 | protected function fetchHTMLRow($class, $depth, $label, $description, $lastPush) { |
179 | 185 | $HTMLPurifier = Codendi_HTMLPurifier::instance(); |
180 | 186 | $description = $HTMLPurifier->purify($description, CODENDI_PURIFIER_CONVERT_HTML); |
@@ -44,6 +44,10 @@ discard block |
||
44 | 44 | return false; |
45 | 45 | } |
46 | 46 | |
47 | + /** |
|
48 | + * @param string $file_name |
|
49 | + * @param string $commit_sha1 |
|
50 | + */ |
|
47 | 51 | private function getFormatedMarkdown($file_name, $commit_sha1) { |
48 | 52 | $content = $this->git_exec->getFileContent($commit_sha1, $file_name); |
49 | 53 | $content_in_form = GitMarkdownFileContentInForm::getMarkdownContentInForm($content); |
@@ -54,6 +58,10 @@ discard block |
||
54 | 58 | ); |
55 | 59 | } |
56 | 60 | |
61 | + /** |
|
62 | + * @param string $node |
|
63 | + * @param string $commit_sha1 |
|
64 | + */ |
|
57 | 65 | private function getReadmeFile($node, $commit_sha1) { |
58 | 66 | $files_list = $this->git_exec->lsTree($commit_sha1, $node); |
59 | 67 | $path = preg_quote($node, DIRECTORY_SEPARATOR); |
@@ -29,6 +29,9 @@ |
||
29 | 29 | /** @var Codendi_Request*/ |
30 | 30 | protected $request; |
31 | 31 | |
32 | + /** |
|
33 | + * @param Git $controller |
|
34 | + */ |
|
32 | 35 | public function __construct( $controller ) { |
33 | 36 | $this->controller = $controller; |
34 | 37 | $this->user = $controller->getUser(); |
@@ -64,6 +64,9 @@ discard block |
||
64 | 64 | $this->request = $request; |
65 | 65 | } |
66 | 66 | |
67 | + /** |
|
68 | + * @return Codendi_Request |
|
69 | + */ |
|
67 | 70 | public function getRequest() { |
68 | 71 | return $this->request; |
69 | 72 | } |
@@ -80,6 +83,7 @@ discard block |
||
80 | 83 | /** |
81 | 84 | * Wrapper of global redirect method |
82 | 85 | * @param String url |
86 | + * @param string $url |
|
83 | 87 | */ |
84 | 88 | public function redirect($url) { |
85 | 89 | $GLOBALS['HTML']->redirect($url); |
@@ -127,7 +131,7 @@ discard block |
||
127 | 131 | } |
128 | 132 | /** |
129 | 133 | * |
130 | - * @param <type> $action |
|
134 | + * @param string $action |
|
131 | 135 | */ |
132 | 136 | public function addPermittedAction($action) { |
133 | 137 | $this->permittedActions[] = $action; |
@@ -161,10 +165,16 @@ discard block |
||
161 | 165 | return $this->actionResultData; |
162 | 166 | } |
163 | 167 | |
168 | + /** |
|
169 | + * @param string $viewName |
|
170 | + */ |
|
164 | 171 | public function addView($viewName, $params=array()) { |
165 | 172 | $this->views[$viewName] = $params; |
166 | 173 | } |
167 | 174 | |
175 | + /** |
|
176 | + * @param string $actionName |
|
177 | + */ |
|
168 | 178 | public function addAction($actionName, $params=array()) { |
169 | 179 | $this->actions[$actionName] = $params; |
170 | 180 | } |
@@ -201,7 +211,7 @@ discard block |
||
201 | 211 | * This functions execute all methods added to the actions class array ($this->actions) |
202 | 212 | * An action is a method of PluginAction class child, several can be added for one request |
203 | 213 | * @TODO associate an action and a view in order to skip action call to provide data to a given view.(like Symfony framework component) |
204 | - * @return null |
|
214 | + * @return false|null |
|
205 | 215 | */ |
206 | 216 | function executeActions() { |
207 | 217 | if ( empty($this->actions) ) { |
@@ -60,6 +60,9 @@ |
||
60 | 60 | call_user_func_array(array($this,$name), $params); |
61 | 61 | } |
62 | 62 | |
63 | + /** |
|
64 | + * @param string $href |
|
65 | + */ |
|
63 | 66 | public static function linkTo($link, $href, $options='' ) { |
64 | 67 | $linkTo = '<a href="'.$href.'" '.$options.' >'.$link.'</a>'; |
65 | 68 | return $linkTo; |
@@ -30,6 +30,9 @@ |
||
30 | 30 | return preg_replace('%/{1,}%',"/", $path); |
31 | 31 | } |
32 | 32 | |
33 | +/** |
|
34 | + * @param string $namespace |
|
35 | + */ |
|
33 | 36 | function userRepoPath($username, $namespace) { |
34 | 37 | $path = unixPathJoin(array('u', $username, $namespace)); |
35 | 38 | if (strpos($path, '..') !== false) { |
@@ -65,6 +65,9 @@ |
||
65 | 65 | return $this->buildUGroupRepresentations($repository, $rewind_ugroups_rows); |
66 | 66 | } |
67 | 67 | |
68 | + /** |
|
69 | + * @param \DataAccessResult $ugroup_rows |
|
70 | + */ |
|
68 | 71 | private function buildUGroupRepresentations(GitRepository $repository, $ugroup_rows) { |
69 | 72 | $ugroup_representations = array(); |
70 | 73 | foreach ($ugroup_rows as $row) { |