@@ -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) { |
@@ -315,6 +315,9 @@ |
||
315 | 315 | } |
316 | 316 | } |
317 | 317 | |
318 | + /** |
|
319 | + * @param string $revision |
|
320 | + */ |
|
318 | 321 | public static function restoreVersion($uid, $filename, $fileToRestore, $revision) { |
319 | 322 | if (\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED) !== true) { |
320 | 323 | return false; |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | * @param SyncService $syncService |
170 | 170 | * @param UserInterface $backend |
171 | 171 | * @param string $missingAccountsAction |
172 | - * @param array $validActions |
|
172 | + * @param string[] $validActions |
|
173 | 173 | */ |
174 | 174 | private function syncMultipleUsers( |
175 | 175 | InputInterface $input, |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | * @param UserInterface $backend |
218 | 218 | * @param string $uid |
219 | 219 | * @param string $missingAccountsAction |
220 | - * @param array $validActions |
|
220 | + * @param string[] $validActions |
|
221 | 221 | */ |
222 | 222 | private function syncSingleUser( |
223 | 223 | InputInterface $input, |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | } |
259 | 259 | |
260 | 260 | /** |
261 | - * @param array $uids a list of uids to the the action |
|
261 | + * @param string[] $uids a list of uids to the the action |
|
262 | 262 | * @param callable $callbackExists the callback used if the account for the uid exists. The |
263 | 263 | * uid and the specific account will be passed as parameter to the callback in that order |
264 | 264 | * @param callable $callbackMissing the callback used if the account doesn't exists. The uid (not |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | * @param string[] $unknownUsers |
280 | 280 | * @param InputInterface $input |
281 | 281 | * @param OutputInterface $output |
282 | - * @param $missingAccountsAction |
|
282 | + * @param string $missingAccountsAction |
|
283 | 283 | * @param $validActions |
284 | 284 | */ |
285 | 285 | private function handleUnknownUsers(array $unknownUsers, InputInterface $input, OutputInterface $output, $missingAccountsAction, $validActions) { |
@@ -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']; |
@@ -443,7 +443,7 @@ |
||
443 | 443 | |
444 | 444 | /** |
445 | 445 | * Checks if the CSRF check was correct |
446 | - * @return bool true if CSRF check passed |
|
446 | + * @return boolean|null true if CSRF check passed |
|
447 | 447 | */ |
448 | 448 | public function passesCSRFCheck() { |
449 | 449 | if ($this->csrfTokenManager === null) { |
@@ -359,6 +359,10 @@ discard block |
||
359 | 359 | } |
360 | 360 | } |
361 | 361 | |
362 | + /** |
|
363 | + * @param string|boolean $user |
|
364 | + * @param string $root |
|
365 | + */ |
|
362 | 366 | public static function init($user, $root) { |
363 | 367 | if (self::$defaultInstance) { |
364 | 368 | return false; |
@@ -517,7 +521,7 @@ discard block |
||
517 | 521 | /** |
518 | 522 | * mount an \OC\Files\Storage\Storage in our virtual filesystem |
519 | 523 | * |
520 | - * @param \OC\Files\Storage\Storage|string $class |
|
524 | + * @param string $class |
|
521 | 525 | * @param array $arguments |
522 | 526 | * @param string $mountpoint |
523 | 527 | */ |
@@ -690,6 +694,9 @@ discard block |
||
690 | 694 | return self::$defaultInstance->is_dir($path); |
691 | 695 | } |
692 | 696 | |
697 | + /** |
|
698 | + * @param string $path |
|
699 | + */ |
|
693 | 700 | public static function is_file($path) { |
694 | 701 | return self::$defaultInstance->is_file($path); |
695 | 702 | } |
@@ -702,6 +709,9 @@ discard block |
||
702 | 709 | return self::$defaultInstance->filetype($path); |
703 | 710 | } |
704 | 711 | |
712 | + /** |
|
713 | + * @param string $path |
|
714 | + */ |
|
705 | 715 | public static function filesize($path) { |
706 | 716 | return self::$defaultInstance->filesize($path); |
707 | 717 | } |
@@ -714,6 +724,9 @@ discard block |
||
714 | 724 | return self::$defaultInstance->isCreatable($path); |
715 | 725 | } |
716 | 726 | |
727 | + /** |
|
728 | + * @param string $path |
|
729 | + */ |
|
717 | 730 | public static function isReadable($path) { |
718 | 731 | return self::$defaultInstance->isReadable($path); |
719 | 732 | } |
@@ -726,6 +739,9 @@ discard block |
||
726 | 739 | return self::$defaultInstance->isDeletable($path); |
727 | 740 | } |
728 | 741 | |
742 | + /** |
|
743 | + * @param string $path |
|
744 | + */ |
|
729 | 745 | public static function isSharable($path) { |
730 | 746 | return self::$defaultInstance->isSharable($path); |
731 | 747 | } |
@@ -743,6 +759,7 @@ discard block |
||
743 | 759 | } |
744 | 760 | |
745 | 761 | /** |
762 | + * @param string $path |
|
746 | 763 | * @return string |
747 | 764 | */ |
748 | 765 | public static function file_get_contents($path) { |
@@ -765,6 +782,10 @@ discard block |
||
765 | 782 | return self::$defaultInstance->copy($path1, $path2); |
766 | 783 | } |
767 | 784 | |
785 | + /** |
|
786 | + * @param string $path |
|
787 | + * @param string $mode |
|
788 | + */ |
|
768 | 789 | public static function fopen($path, $mode) { |
769 | 790 | return self::$defaultInstance->fopen($path, $mode); |
770 | 791 | } |
@@ -780,6 +801,9 @@ discard block |
||
780 | 801 | return self::$defaultInstance->fromTmpFile($tmpFile, $path); |
781 | 802 | } |
782 | 803 | |
804 | + /** |
|
805 | + * @param string $path |
|
806 | + */ |
|
783 | 807 | public static function getMimeType($path) { |
784 | 808 | return self::$defaultInstance->getMimeType($path); |
785 | 809 | } |
@@ -792,6 +816,9 @@ discard block |
||
792 | 816 | return self::$defaultInstance->free_space($path); |
793 | 817 | } |
794 | 818 | |
819 | + /** |
|
820 | + * @param string $query |
|
821 | + */ |
|
795 | 822 | public static function search($query) { |
796 | 823 | return self::$defaultInstance->search($query); |
797 | 824 | } |
@@ -900,7 +927,7 @@ discard block |
||
900 | 927 | * @param string $path |
901 | 928 | * @param boolean $includeMountPoints whether to add mountpoint sizes, |
902 | 929 | * defaults to true |
903 | - * @return \OC\Files\FileInfo|bool False if file does not exist |
|
930 | + * @return \OCP\Files\FileInfo|null False if file does not exist |
|
904 | 931 | */ |
905 | 932 | public static function getFileInfo($path, $includeMountPoints = true) { |
906 | 933 | return self::$defaultInstance->getFileInfo($path, $includeMountPoints); |
@@ -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) { |