@@ -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) { |
@@ -29,21 +29,33 @@ discard block |
||
29 | 29 | $this->repository = new GitRepository(); |
30 | 30 | } |
31 | 31 | |
32 | + /** |
|
33 | + * @param string $path |
|
34 | + */ |
|
32 | 35 | public function withPath($path) { |
33 | 36 | $this->repository->setPath($path); |
34 | 37 | return $this; |
35 | 38 | } |
36 | 39 | |
40 | + /** |
|
41 | + * @param string $namespace |
|
42 | + */ |
|
37 | 43 | public function withNamespace($namespace) { |
38 | 44 | $this->repository->setNamespace($namespace); |
39 | 45 | return $this; |
40 | 46 | } |
41 | 47 | |
48 | + /** |
|
49 | + * @param integer $id |
|
50 | + */ |
|
42 | 51 | public function withId($id) { |
43 | 52 | $this->repository->setId($id); |
44 | 53 | return $this; |
45 | 54 | } |
46 | 55 | |
56 | + /** |
|
57 | + * @param string $name |
|
58 | + */ |
|
47 | 59 | public function withName($name) { |
48 | 60 | $this->repository->setName($name); |
49 | 61 | return $this; |
@@ -59,21 +71,33 @@ discard block |
||
59 | 71 | return $this; |
60 | 72 | } |
61 | 73 | |
74 | + /** |
|
75 | + * @param integer $id |
|
76 | + */ |
|
62 | 77 | public function withRemoteServerId($id) { |
63 | 78 | $this->repository->setRemoteServerId($id); |
64 | 79 | return $this; |
65 | 80 | } |
66 | 81 | |
82 | + /** |
|
83 | + * @param string $description |
|
84 | + */ |
|
67 | 85 | public function withDescription($description) { |
68 | 86 | $this->repository->setDescription($description); |
69 | 87 | return $this; |
70 | 88 | } |
71 | 89 | |
90 | + /** |
|
91 | + * @param string $prefix |
|
92 | + */ |
|
72 | 93 | public function withMailPrefix($prefix) { |
73 | 94 | $this->repository->setMailPrefix($prefix); |
74 | 95 | return $this; |
75 | 96 | } |
76 | 97 | |
98 | + /** |
|
99 | + * @param string[] $emails |
|
100 | + */ |
|
77 | 101 | public function withNotifiedEmails($emails) { |
78 | 102 | $this->repository->setNotifiedMails($emails); |
79 | 103 | return $this; |
@@ -79,6 +79,9 @@ |
||
79 | 79 | $this->driver = new Git_Driver_GerritREST($this->guzzle_client, $this->logger); |
80 | 80 | } |
81 | 81 | |
82 | + /** |
|
83 | + * @param string $text |
|
84 | + */ |
|
82 | 85 | protected function getGuzzleRequestWithTextResponse($text) { |
83 | 86 | $response = stub('Guzzle\Http\Message\Response')->getBody(true)->returns($text); |
84 | 87 | return stub('Guzzle\Http\Message\EntityEnclosingRequest')->send()->returns($response); |
@@ -277,6 +277,10 @@ |
||
277 | 277 | $this->assertEqual('project1/repo', $this->project_serializer->repoFullName($repo, $unix_name)); |
278 | 278 | } |
279 | 279 | |
280 | + /** |
|
281 | + * @param string $name |
|
282 | + * @param string $namespace |
|
283 | + */ |
|
280 | 284 | private function _GivenARepositoryWithNameAndNamespace($name, $namespace) { |
281 | 285 | $repo = new GitRepository(); |
282 | 286 | $repo->setName($name); |
@@ -73,12 +73,18 @@ discard block |
||
73 | 73 | parent::tearDown(); |
74 | 74 | } |
75 | 75 | |
76 | + /** |
|
77 | + * @param string $path |
|
78 | + */ |
|
76 | 79 | protected function getManifestContent($path) { |
77 | 80 | $content = file_get_contents("compress.zlib://$path"); |
78 | 81 | |
79 | 82 | return json_decode($content, true); |
80 | 83 | } |
81 | 84 | |
85 | + /** |
|
86 | + * @param string $path |
|
87 | + */ |
|
82 | 88 | protected function forgeExistingManifestFile($path) { |
83 | 89 | file_put_contents( |
84 | 90 | "compress.zlib://$path", |
@@ -86,6 +92,9 @@ discard block |
||
86 | 92 | ); |
87 | 93 | } |
88 | 94 | |
95 | + /** |
|
96 | + * @param string $path |
|
97 | + */ |
|
89 | 98 | protected function forgeExistingManifestFileWithGitoliteAdmin($path) { |
90 | 99 | file_put_contents( |
91 | 100 | "compress.zlib://$path", |
@@ -164,7 +164,8 @@ discard block |
||
164 | 164 | $this->assertNull($url->getProject()); |
165 | 165 | } |
166 | 166 | |
167 | - /** @return Git_URL */ |
|
167 | + /** @param string $uri |
|
168 | +/** @return Git_URL */ |
|
168 | 169 | private function getGitURL($uri = null) { |
169 | 170 | return new Git_URL( |
170 | 171 | $this->project_manager, |
@@ -337,7 +338,8 @@ discard block |
||
337 | 338 | $this->assertEqual($url->getQueryString(), 'service=git-upload-pack'); |
338 | 339 | } |
339 | 340 | |
340 | - /** @return Git_URL */ |
|
341 | + /** @param string $url |
|
342 | +/** @return Git_URL */ |
|
341 | 343 | private function getUrl($url) { |
342 | 344 | return new Git_URL( |
343 | 345 | $this->project_manager, |
@@ -34,6 +34,10 @@ discard block |
||
34 | 34 | |
35 | 35 | abstract class Git_Backend_GitoliteCommonTest extends TuleapTestCase { |
36 | 36 | |
37 | + /** |
|
38 | + * @param string $name |
|
39 | + * @param string $namespace |
|
40 | + */ |
|
37 | 41 | protected function _GivenAGitRepoWithNameAndNamespace($name, $namespace) { |
38 | 42 | $repository = new GitRepository(); |
39 | 43 | $repository->setName($name); |
@@ -92,6 +96,10 @@ discard block |
||
92 | 96 | unlink(dirname(__FILE__).'/_fixtures/tmp/perms'); |
93 | 97 | } |
94 | 98 | |
99 | + /** |
|
100 | + * @param string $className |
|
101 | + * @param string[] $methods |
|
102 | + */ |
|
95 | 103 | function getPartialMock($className, $methods) { |
96 | 104 | $partialName = $className.'Partial'.uniqid(); |
97 | 105 | Mock::generatePartial($className, $partialName, $methods); |