@@ -64,6 +64,9 @@ |
||
64 | 64 | return $reference; |
65 | 65 | } |
66 | 66 | |
67 | + /** |
|
68 | + * @param string $value |
|
69 | + */ |
|
67 | 70 | private function splitRepositoryAndSha1($value) { |
68 | 71 | $last_slash_position = strrpos($value, '/'); |
69 | 72 | $repository_name = substr($value, 0, $last_slash_position); |
@@ -20,6 +20,9 @@ discard block |
||
20 | 20 | require_once 'common/dao/include/DataAccessObject.class.php'; |
21 | 21 | class Git_RemoteServer_Dao extends DataAccessObject { |
22 | 22 | |
23 | + /** |
|
24 | + * @param integer $id |
|
25 | + */ |
|
23 | 26 | public function searchById($id) { |
24 | 27 | $id = $this->da->escapeInt($id); |
25 | 28 | $sql = "SELECT * |
@@ -36,6 +39,7 @@ discard block |
||
36 | 39 | /** |
37 | 40 | * This sql request returns for a given project all the servers |
38 | 41 | * where its git repositories are migrated |
42 | + * @param integer $project_id |
|
39 | 43 | */ |
40 | 44 | public function searchAllByProjectId($project_id) { |
41 | 45 | $project_id = $this->da->escapeInt($project_id); |
@@ -46,6 +50,9 @@ discard block |
||
46 | 50 | return $this->retrieve($sql); |
47 | 51 | } |
48 | 52 | |
53 | + /** |
|
54 | + * @param integer $user_id |
|
55 | + */ |
|
49 | 56 | public function searchAllRemoteServersForUserId($user_id) { |
50 | 57 | $sql = "SELECT DISTINCT pgrs.* |
51 | 58 | FROM plugin_git_remote_servers pgrs |
@@ -68,6 +75,10 @@ discard block |
||
68 | 75 | return $this->retrieve($sql); |
69 | 76 | } |
70 | 77 | |
78 | + /** |
|
79 | + * @param integer $project_id |
|
80 | + * @param integer $ugroup_id |
|
81 | + */ |
|
71 | 82 | public function searchAllByUGroupId($project_id, $ugroup_id) { |
72 | 83 | $project_id = $this->da->escapeInt($project_id); |
73 | 84 | $ugroup_id = $this->da->escapeInt($ugroup_id); |
@@ -79,6 +90,12 @@ discard block |
||
79 | 90 | return $this->retrieve($sql); |
80 | 91 | } |
81 | 92 | |
93 | + /** |
|
94 | + * @param string $replication_key |
|
95 | + * @param boolean $use_ssl |
|
96 | + * @param string $gerrit_version |
|
97 | + * @param string $http_password |
|
98 | + */ |
|
82 | 99 | public function save( |
83 | 100 | $id, |
84 | 101 | $host, |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | /** |
43 | 43 | * @param int $id |
44 | - * @return \Git_RemoteServer_GerritReplicationSSHKey |
|
44 | + * @return Git_RemoteServer_Gerrit_ReplicationSSHKey |
|
45 | 45 | */ |
46 | 46 | public function setGerritHostId($id) { |
47 | 47 | $this->host_id = $id; |
@@ -20,6 +20,9 @@ |
||
20 | 20 | |
21 | 21 | class Git_RemoteServer_GerritServerPresenter { |
22 | 22 | |
23 | + /** |
|
24 | + * @param boolean $is_used |
|
25 | + */ |
|
23 | 26 | public function __construct(Git_RemoteServer_GerritServer $server, $is_used) { |
24 | 27 | $this->id = $server->getId(); |
25 | 28 | $this->host = $server->getHost(); |
@@ -20,6 +20,9 @@ |
||
20 | 20 | |
21 | 21 | class Git_RemoteServer_NotFoundException extends Exception { |
22 | 22 | |
23 | + /** |
|
24 | + * @param integer $id |
|
25 | + */ |
|
23 | 26 | public function __construct($id) { |
24 | 27 | parent::__construct("No server found with the id: $id"); |
25 | 28 | } |
@@ -112,6 +112,9 @@ discard block |
||
112 | 112 | ); |
113 | 113 | } |
114 | 114 | |
115 | + /** |
|
116 | + * @param integer $remote_server_id |
|
117 | + */ |
|
115 | 118 | public function queueMigrateToGerrit(GitRepository $repository, $remote_server_id, $gerrit_template_id) { |
116 | 119 | $this->system_event_manager->createEvent( |
117 | 120 | SystemEvent_GIT_GERRIT_MIGRATION::NAME, |
@@ -161,6 +164,9 @@ discard block |
||
161 | 164 | ); |
162 | 165 | } |
163 | 166 | |
167 | + /** |
|
168 | + * @param string $repository_path |
|
169 | + */ |
|
164 | 170 | public function queueGrokMirrorManifestRepoDelete($repository_path) { |
165 | 171 | $this->system_event_manager->createEvent( |
166 | 172 | SystemEvent_GIT_GROKMIRROR_MANIFEST_REPODELETE::NAME, |
@@ -50,6 +50,9 @@ discard block |
||
50 | 50 | $this->synchroniseSSHKeysWithGerrit($original_keys, $new_keys, $user); |
51 | 51 | } |
52 | 52 | |
53 | + /** |
|
54 | + * @param PFUser $user |
|
55 | + */ |
|
53 | 56 | private function synchroniseSSHKeysWithGerrit($original_keys, $new_keys, $user) { |
54 | 57 | $this->getGerritUserAccountManager() |
55 | 58 | ->synchroniseSSHKeys( |
@@ -61,7 +64,6 @@ discard block |
||
61 | 64 | |
62 | 65 | /** |
63 | 66 | * |
64 | - * @param Git_RemoteServer_GerritServerFactory $factory |
|
65 | 67 | * @return void |
66 | 68 | * @throws Git_UserSynchronisationException |
67 | 69 | */ |
@@ -69,6 +71,9 @@ discard block |
||
69 | 71 | $this->pushSSHKeysToGerrit($user); |
70 | 72 | } |
71 | 73 | |
74 | + /** |
|
75 | + * @param PFUser $user |
|
76 | + */ |
|
72 | 77 | private function pushSSHKeysToGerrit($user) { |
73 | 78 | $this->getGerritUserAccountManager()->pushSSHKeys($user); |
74 | 79 | } |
@@ -68,6 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
71 | + * @param GitRepository $repository |
|
71 | 72 | * @return bool |
72 | 73 | */ |
73 | 74 | public function updateRepoConf($repository) { |
@@ -136,6 +137,9 @@ discard block |
||
136 | 137 | } |
137 | 138 | } |
138 | 139 | |
140 | + /** |
|
141 | + * @param string $key |
|
142 | + */ |
|
139 | 143 | private function getConfigurationParameter($key) { |
140 | 144 | $value = $this->getGitPlugin()->getConfigurationParameter($key); |
141 | 145 | if ($value !== false && $value !== null) { |
@@ -283,7 +287,7 @@ discard block |
||
283 | 287 | * @param Project $project The project to rename |
284 | 288 | * @param string $newName The new name of the project |
285 | 289 | * |
286 | - * @return true if success, false otherwise |
|
290 | + * @return boolean if success, false otherwise |
|
287 | 291 | */ |
288 | 292 | public function renameProject(Project $project, $newName) { |
289 | 293 | if (is_dir($this->driver->getRepositoriesPath() .'/'. $project->getUnixName())) { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * Verify if the repository as already some content within |
27 | 27 | * |
28 | 28 | * @see plugins/git/include/Git_Backend_Interface::isInitialized() |
29 | - * @param GitRepository $repository |
|
29 | + * @param GitRepository $respository |
|
30 | 30 | * @return Boolean |
31 | 31 | */ |
32 | 32 | public function isInitialized(GitRepository $respository); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * Verify if the repository has been created |
36 | 36 | * |
37 | 37 | * @see plugins/git/include/Git_Backend_Interface::isCreated() |
38 | - * @param GitRepository $repository |
|
38 | + * @param GitRepository $respository |
|
39 | 39 | * @return Boolean |
40 | 40 | */ |
41 | 41 | public function isCreated(GitRepository $respository); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | * @param Project $project The project to rename |
106 | 106 | * @param string $newName The new name of the project |
107 | 107 | * |
108 | - * @return true if success, false otherwise |
|
108 | + * @return boolean if success, false otherwise |
|
109 | 109 | */ |
110 | 110 | public function renameProject(Project $project, $newName); |
111 | 111 | |
@@ -120,6 +120,7 @@ discard block |
||
120 | 120 | * Perform logical deletion repository in DB |
121 | 121 | * |
122 | 122 | * @param GitRepository $repository |
123 | + * @return void |
|
123 | 124 | */ |
124 | 125 | public function markAsDeleted(GitRepository $repository); |
125 | 126 | |
@@ -127,6 +128,7 @@ discard block |
||
127 | 128 | * Physically delete a repository already marked for deletion |
128 | 129 | * |
129 | 130 | * @param GitRepository $repository |
131 | + * @return void |
|
130 | 132 | */ |
131 | 133 | public function delete(GitRepository $repository); |
132 | 134 | |
@@ -134,6 +136,7 @@ discard block |
||
134 | 136 | * Purge archived repository |
135 | 137 | * |
136 | 138 | * @param GitRepository $repository |
139 | + * @return void |
|
137 | 140 | */ |
138 | 141 | public function deleteArchivedRepository(GitRepository $repository); |
139 | 142 | |
@@ -141,6 +144,7 @@ discard block |
||
141 | 144 | * Move the archived gitolite repositories to the archiving area before purge |
142 | 145 | * |
143 | 146 | * @param GitRepository $repository |
147 | + * @return boolean |
|
144 | 148 | */ |
145 | 149 | public function archiveBeforePurge(GitRepository $repository); |
146 | 150 | } |