@@ -143,7 +143,7 @@ |
||
| 143 | 143 | * Returns the list of members for a group-principal |
| 144 | 144 | * |
| 145 | 145 | * @param string $principal |
| 146 | - * @return array |
|
| 146 | + * @return string[] |
|
| 147 | 147 | */ |
| 148 | 148 | public function getGroupMemberSet($principal) { |
| 149 | 149 | // TODO: for now the group principal has only one member, the user itself |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | /** |
| 184 | 184 | * @param IFile[] $nodes |
| 185 | 185 | * @param IFile $backingFile |
| 186 | - * @param $fileLength |
|
| 186 | + * @param string $fileLength |
|
| 187 | 187 | * @return resource |
| 188 | 188 | * |
| 189 | 189 | * @throws \BadMethodCallException |
@@ -207,6 +207,9 @@ discard block |
||
| 207 | 207 | return $wrapped; |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | + /** |
|
| 211 | + * @param integer $current |
|
| 212 | + */ |
|
| 210 | 213 | protected function getNextNodeStart($current) { |
| 211 | 214 | foreach ($this->sortedNodes as $node) { |
| 212 | 215 | if ($current >= $node['start'] && $current < $node['end']) { |
@@ -220,7 +223,7 @@ discard block |
||
| 220 | 223 | } |
| 221 | 224 | |
| 222 | 225 | /** |
| 223 | - * @param $pos |
|
| 226 | + * @param integer $pos |
|
| 224 | 227 | */ |
| 225 | 228 | protected function getNodeForPosition($pos) { |
| 226 | 229 | foreach ($this->sortedNodes as $node) { |
@@ -107,6 +107,7 @@ |
||
| 107 | 107 | * |
| 108 | 108 | * @param string &$zsyncMetadata actual metadata |
| 109 | 109 | * @param string $destination destination path |
| 110 | + * @param string|null $zsyncMetadata |
|
| 110 | 111 | */ |
| 111 | 112 | private function postMoveZsync(&$zsyncMetadata, $destination) { |
| 112 | 113 | if (!$zsyncMetadata) { |
@@ -308,6 +308,9 @@ |
||
| 308 | 308 | return $result; |
| 309 | 309 | } |
| 310 | 310 | |
| 311 | + /** |
|
| 312 | + * @param string $mountPoint |
|
| 313 | + */ |
|
| 311 | 314 | public function removeShare($mountPoint) { |
| 312 | 315 | $mountPointObj = $this->mountManager->find($mountPoint); |
| 313 | 316 | $id = $mountPointObj->getStorage()->getCache()->getId(''); |
@@ -134,7 +134,7 @@ |
||
| 134 | 134 | * check if it is a file located in data/user/files only files in the |
| 135 | 135 | * 'files' directory should be moved to the trash |
| 136 | 136 | * |
| 137 | - * @param $path |
|
| 137 | + * @param string $path |
|
| 138 | 138 | * @return bool |
| 139 | 139 | */ |
| 140 | 140 | protected function shouldMoveToTrash($path) { |
@@ -131,8 +131,8 @@ |
||
| 131 | 131 | |
| 132 | 132 | /** |
| 133 | 133 | * Check if command is allowed and has a valid security token |
| 134 | - * @param $command |
|
| 135 | - * @param $token |
|
| 134 | + * @param string $command |
|
| 135 | + * @param string $token |
|
| 136 | 136 | */ |
| 137 | 137 | protected function validateRequest($command, $token) { |
| 138 | 138 | $allowedHosts = ['::1', '127.0.0.1', 'localhost']; |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | * @param string $path |
| 176 | 176 | * @throws \OCP\Files\NotFoundException |
| 177 | 177 | * @throws \OCP\Files\NotPermittedException |
| 178 | - * @return File|Folder |
|
| 178 | + * @return string |
|
| 179 | 179 | */ |
| 180 | 180 | public function get($path) { |
| 181 | 181 | $path = $this->normalizePath($path); |
@@ -373,6 +373,9 @@ discard block |
||
| 373 | 373 | return $folder; |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | + /** |
|
| 377 | + * @param string $fullPath |
|
| 378 | + */ |
|
| 376 | 379 | private function resolveVirtualNode($fullPath) { |
| 377 | 380 | $pieces = \explode('/', $fullPath); |
| 378 | 381 | if ($pieces[1] !== 'meta') { |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | /** |
| 270 | 270 | * authenticate the api call |
| 271 | 271 | * @param array $action the action details as supplied to OC_API::register() |
| 272 | - * @return bool |
|
| 272 | + * @return boolean|string |
|
| 273 | 273 | */ |
| 274 | 274 | private static function isAuthorised($action) { |
| 275 | 275 | $level = $action['authlevel']; |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | |
| 319 | 319 | /** |
| 320 | 320 | * http basic auth |
| 321 | - * @return string|false (username, or false on failure) |
|
| 321 | + * @return string|boolean (username, or false on failure) |
|
| 322 | 322 | */ |
| 323 | 323 | private static function loginUser() { |
| 324 | 324 | if (self::$isLoggedIn === true) { |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * @param string $wrongPath wrong path of the entry to fix |
| 103 | 103 | * @param int $correctStorageNumericId numeric idea of the correct storage |
| 104 | 104 | * @param string $correctPath value to which to set the path of the entry |
| 105 | - * @return bool true for success |
|
| 105 | + * @return boolean|null true for success |
|
| 106 | 106 | */ |
| 107 | 107 | private function fixEntryPath(IOutput $out, $fileId, $wrongPath, $correctStorageNumericId, $correctPath) { |
| 108 | 108 | // delete target if exists |
@@ -132,6 +132,9 @@ discard block |
||
| 132 | 132 | $out->advance(1, $text); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | + /** |
|
| 136 | + * @param \OCP\DB\QueryBuilder\IQueryBuilder $qb |
|
| 137 | + */ |
|
| 135 | 138 | private function addQueryConditionsParentIdWrongPath($qb) { |
| 136 | 139 | // thanks, VicDeo! |
| 137 | 140 | if ($this->connection->getDatabasePlatform() instanceof MySqlPlatform) { |
@@ -171,6 +174,9 @@ discard block |
||
| 171 | 174 | } |
| 172 | 175 | } |
| 173 | 176 | |
| 177 | + /** |
|
| 178 | + * @param \OCP\DB\QueryBuilder\IQueryBuilder $qb |
|
| 179 | + */ |
|
| 174 | 180 | private function addQueryConditionsNonExistingParentIdEntry($qb, $storageNumericId = null) { |
| 175 | 181 | // Subquery for parent existence |
| 176 | 182 | $qbe = $this->connection->getQueryBuilder(); |
@@ -200,6 +206,9 @@ discard block |
||
| 200 | 206 | } |
| 201 | 207 | } |
| 202 | 208 | |
| 209 | + /** |
|
| 210 | + * @param integer $storageNumericId |
|
| 211 | + */ |
|
| 203 | 212 | private function countResultsToProcessParentIdWrongPath($storageNumericId = null) { |
| 204 | 213 | $qb = $this->connection->getQueryBuilder(); |
| 205 | 214 | $qb->select($qb->createFunction('COUNT(*)')); |
@@ -210,6 +219,9 @@ discard block |
||
| 210 | 219 | return $count; |
| 211 | 220 | } |
| 212 | 221 | |
| 222 | + /** |
|
| 223 | + * @param integer $storageNumericId |
|
| 224 | + */ |
|
| 213 | 225 | private function countResultsToProcessNonExistingParentIdEntry($storageNumericId = null) { |
| 214 | 226 | $qb = $this->connection->getQueryBuilder(); |
| 215 | 227 | $qb->select($qb->createFunction('COUNT(*)')); |
@@ -359,6 +371,7 @@ discard block |
||
| 359 | 371 | * |
| 360 | 372 | * @param int $storageId storage id |
| 361 | 373 | * @param string $path path for which to create the parent entry |
| 374 | + * @param integer $reuseFileId |
|
| 362 | 375 | * @return int file id of the newly created parent |
| 363 | 376 | */ |
| 364 | 377 | private function getOrCreateEntry($storageId, $path, $reuseFileId = null) { |