@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | * ->leftJoin('u', 'phonenumbers', 'p', 'u.id = p.user_id'); |
| 307 | 307 | * </code> |
| 308 | 308 | * |
| 309 | - * @param mixed $select The selection expressions. |
|
| 309 | + * @param string $select The selection expressions. |
|
| 310 | 310 | * |
| 311 | 311 | * @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance. |
| 312 | 312 | */ |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | * ->leftJoin('u', 'phonenumbers', 'p', 'u.id = p.user_id'); |
| 331 | 331 | * </code> |
| 332 | 332 | * |
| 333 | - * @param mixed $select The selection expressions. |
|
| 333 | + * @param QueryFunction $select The selection expressions. |
|
| 334 | 334 | * @param string $alias The column alias used in the constructed query. |
| 335 | 335 | * |
| 336 | 336 | * @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance. |
@@ -652,7 +652,7 @@ discard block |
||
| 652 | 652 | * ->where($or); |
| 653 | 653 | * </code> |
| 654 | 654 | * |
| 655 | - * @param mixed $predicates The restriction predicates. |
|
| 655 | + * @param CompositeExpression $predicates The restriction predicates. |
|
| 656 | 656 | * |
| 657 | 657 | * @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance. |
| 658 | 658 | */ |
@@ -1034,7 +1034,7 @@ discard block |
||
| 1034 | 1034 | * |
| 1035 | 1035 | * @param string $name |
| 1036 | 1036 | * |
| 1037 | - * @return IParameter |
|
| 1037 | + * @return string |
|
| 1038 | 1038 | */ |
| 1039 | 1039 | public function createParameter($name) { |
| 1040 | 1040 | return new Parameter(':' . $name); |
@@ -30,7 +30,6 @@ |
||
| 30 | 30 | use OC\Files\Filesystem; |
| 31 | 31 | use OC\Files\View; |
| 32 | 32 | use OCP\Encryption\IEncryptionModule; |
| 33 | -use OCP\Files\Storage; |
|
| 34 | 33 | use OCP\IConfig; |
| 35 | 34 | |
| 36 | 35 | class Util { |
@@ -402,6 +402,9 @@ |
||
| 402 | 402 | } |
| 403 | 403 | } |
| 404 | 404 | |
| 405 | + /** |
|
| 406 | + * @param string $path |
|
| 407 | + */ |
|
| 405 | 408 | private function getParentPath($path) { |
| 406 | 409 | $parent = dirname($path); |
| 407 | 410 | if ($parent === '.') { |
@@ -386,6 +386,14 @@ discard block |
||
| 386 | 386 | return $size; |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | + /** |
|
| 390 | + * @param string $path |
|
| 391 | + * @param boolean $recursive |
|
| 392 | + * @param integer $reuse |
|
| 393 | + * @param integer|null $folderId |
|
| 394 | + * @param boolean $lock |
|
| 395 | + * @param integer $size |
|
| 396 | + */ |
|
| 389 | 397 | private function handleChildren($path, $recursive, $reuse, $folderId, $lock, &$size) { |
| 390 | 398 | // we put this in it's own function so it cleans up the memory before we start recursing |
| 391 | 399 | $existingChildren = $this->getExistingChildren($folderId); |
@@ -485,6 +493,9 @@ discard block |
||
| 485 | 493 | } |
| 486 | 494 | } |
| 487 | 495 | |
| 496 | + /** |
|
| 497 | + * @param string|boolean $path |
|
| 498 | + */ |
|
| 488 | 499 | private function runBackgroundScanJob(callable $callback, $path) { |
| 489 | 500 | try { |
| 490 | 501 | $callback(); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | /** |
| 72 | 72 | * @param array $entry |
| 73 | - * @return array |
|
| 73 | + * @return string |
|
| 74 | 74 | */ |
| 75 | 75 | protected function formatCacheEntry($entry) { |
| 76 | 76 | if (isset($entry['path'])) { |
@@ -189,6 +189,9 @@ discard block |
||
| 189 | 189 | return $this->cache->getStatus($this->getSourcePath($file)); |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | + /** |
|
| 193 | + * @param \OCP\Files\Cache\ICacheEntry[] $results |
|
| 194 | + */ |
|
| 192 | 195 | private function formatSearchResults($results) { |
| 193 | 196 | $results = array_filter($results, array($this, 'filterCacheEntry')); |
| 194 | 197 | $results = array_values($results); |
@@ -274,7 +277,7 @@ discard block |
||
| 274 | 277 | * use the one with the highest id gives the best result with the background scanner, since that is most |
| 275 | 278 | * likely the folder where we stopped scanning previously |
| 276 | 279 | * |
| 277 | - * @return string|bool the path of the folder or false when no folder matched |
|
| 280 | + * @return boolean the path of the folder or false when no folder matched |
|
| 278 | 281 | */ |
| 279 | 282 | public function getIncomplete() { |
| 280 | 283 | // not supported |
@@ -206,7 +206,7 @@ |
||
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | /** |
| 209 | - * @param $fileId |
|
| 209 | + * @param integer $fileId |
|
| 210 | 210 | * @return array |
| 211 | 211 | * @throws \OCP\Files\NotFoundException |
| 212 | 212 | */ |
@@ -23,15 +23,12 @@ |
||
| 23 | 23 | |
| 24 | 24 | namespace OC\Files\Config; |
| 25 | 25 | |
| 26 | -use Doctrine\DBAL\Exception\UniqueConstraintViolationException; |
|
| 27 | -use OC\Files\Filesystem; |
|
| 28 | 26 | use OCA\Files_Sharing\SharedMount; |
| 29 | 27 | use OCP\DB\QueryBuilder\IQueryBuilder; |
| 30 | 28 | use OCP\Files\Config\ICachedMountInfo; |
| 31 | 29 | use OCP\Files\Config\IUserMountCache; |
| 32 | 30 | use OCP\Files\Mount\IMountPoint; |
| 33 | 31 | use OCP\Files\NotFoundException; |
| 34 | -use OCP\ICache; |
|
| 35 | 32 | use OCP\IDBConnection; |
| 36 | 33 | use OCP\ILogger; |
| 37 | 34 | use OCP\IUser; |
@@ -355,6 +355,9 @@ discard block |
||
| 355 | 355 | } |
| 356 | 356 | } |
| 357 | 357 | |
| 358 | + /** |
|
| 359 | + * @param string $root |
|
| 360 | + */ |
|
| 358 | 361 | static public function init($user, $root) { |
| 359 | 362 | if (self::$defaultInstance) { |
| 360 | 363 | return false; |
@@ -494,7 +497,7 @@ discard block |
||
| 494 | 497 | /** |
| 495 | 498 | * mount an \OC\Files\Storage\Storage in our virtual filesystem |
| 496 | 499 | * |
| 497 | - * @param \OC\Files\Storage\Storage|string $class |
|
| 500 | + * @param string $class |
|
| 498 | 501 | * @param array $arguments |
| 499 | 502 | * @param string $mountpoint |
| 500 | 503 | */ |
@@ -605,6 +608,7 @@ discard block |
||
| 605 | 608 | |
| 606 | 609 | /** |
| 607 | 610 | * following functions are equivalent to their php builtin equivalents for arguments/return values. |
| 611 | + * @param string $path |
|
| 608 | 612 | */ |
| 609 | 613 | static public function mkdir($path) { |
| 610 | 614 | return self::$defaultInstance->mkdir($path); |
@@ -626,6 +630,9 @@ discard block |
||
| 626 | 630 | return self::$defaultInstance->is_dir($path); |
| 627 | 631 | } |
| 628 | 632 | |
| 633 | + /** |
|
| 634 | + * @param string $path |
|
| 635 | + */ |
|
| 629 | 636 | static public function is_file($path) { |
| 630 | 637 | return self::$defaultInstance->is_file($path); |
| 631 | 638 | } |
@@ -638,6 +645,9 @@ discard block |
||
| 638 | 645 | return self::$defaultInstance->filetype($path); |
| 639 | 646 | } |
| 640 | 647 | |
| 648 | + /** |
|
| 649 | + * @param string $path |
|
| 650 | + */ |
|
| 641 | 651 | static public function filesize($path) { |
| 642 | 652 | return self::$defaultInstance->filesize($path); |
| 643 | 653 | } |
@@ -650,6 +660,9 @@ discard block |
||
| 650 | 660 | return self::$defaultInstance->isCreatable($path); |
| 651 | 661 | } |
| 652 | 662 | |
| 663 | + /** |
|
| 664 | + * @param string $path |
|
| 665 | + */ |
|
| 653 | 666 | static public function isReadable($path) { |
| 654 | 667 | return self::$defaultInstance->isReadable($path); |
| 655 | 668 | } |
@@ -662,6 +675,9 @@ discard block |
||
| 662 | 675 | return self::$defaultInstance->isDeletable($path); |
| 663 | 676 | } |
| 664 | 677 | |
| 678 | + /** |
|
| 679 | + * @param string $path |
|
| 680 | + */ |
|
| 665 | 681 | static public function isSharable($path) { |
| 666 | 682 | return self::$defaultInstance->isSharable($path); |
| 667 | 683 | } |
@@ -679,6 +695,7 @@ discard block |
||
| 679 | 695 | } |
| 680 | 696 | |
| 681 | 697 | /** |
| 698 | + * @param string $path |
|
| 682 | 699 | * @return string |
| 683 | 700 | */ |
| 684 | 701 | static public function file_get_contents($path) { |
@@ -701,6 +718,10 @@ discard block |
||
| 701 | 718 | return self::$defaultInstance->copy($path1, $path2); |
| 702 | 719 | } |
| 703 | 720 | |
| 721 | + /** |
|
| 722 | + * @param string $path |
|
| 723 | + * @param string $mode |
|
| 724 | + */ |
|
| 704 | 725 | static public function fopen($path, $mode) { |
| 705 | 726 | return self::$defaultInstance->fopen($path, $mode); |
| 706 | 727 | } |
@@ -716,6 +737,9 @@ discard block |
||
| 716 | 737 | return self::$defaultInstance->fromTmpFile($tmpFile, $path); |
| 717 | 738 | } |
| 718 | 739 | |
| 740 | + /** |
|
| 741 | + * @param string $path |
|
| 742 | + */ |
|
| 719 | 743 | static public function getMimeType($path) { |
| 720 | 744 | return self::$defaultInstance->getMimeType($path); |
| 721 | 745 | } |
@@ -728,6 +752,9 @@ discard block |
||
| 728 | 752 | return self::$defaultInstance->free_space($path); |
| 729 | 753 | } |
| 730 | 754 | |
| 755 | + /** |
|
| 756 | + * @param string $query |
|
| 757 | + */ |
|
| 731 | 758 | static public function search($query) { |
| 732 | 759 | return self::$defaultInstance->search($query); |
| 733 | 760 | } |
@@ -836,7 +863,7 @@ discard block |
||
| 836 | 863 | * @param string $path |
| 837 | 864 | * @param boolean $includeMountPoints whether to add mountpoint sizes, |
| 838 | 865 | * defaults to true |
| 839 | - * @return \OC\Files\FileInfo|bool False if file does not exist |
|
| 866 | + * @return \OCP\Files\FileInfo|null False if file does not exist |
|
| 840 | 867 | */ |
| 841 | 868 | public static function getFileInfo($path, $includeMountPoints = true) { |
| 842 | 869 | return self::$defaultInstance->getFileInfo($path, $includeMountPoints); |
@@ -62,7 +62,6 @@ |
||
| 62 | 62 | use OC\Files\Mount\MountPoint; |
| 63 | 63 | use OC\Files\Storage\StorageFactory; |
| 64 | 64 | use OCP\Files\Config\IMountProvider; |
| 65 | -use OCP\Files\Mount\IMountPoint; |
|
| 66 | 65 | use OCP\Files\NotFoundException; |
| 67 | 66 | use OCP\IUserManager; |
| 68 | 67 | |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | * Magic method to first get the real rootFolder and then |
| 53 | 53 | * call $method with $args on it |
| 54 | 54 | * |
| 55 | - * @param $method |
|
| 55 | + * @param string $method |
|
| 56 | 56 | * @param $args |
| 57 | 57 | * @return mixed |
| 58 | 58 | */ |
@@ -20,9 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | namespace OC\Files\Node; |
| 22 | 22 | |
| 23 | -use OC\Files\Mount\MountPoint; |
|
| 24 | 23 | use OCP\Files\IRootFolder; |
| 25 | -use OCP\Files\NotPermittedException; |
|
| 26 | 24 | |
| 27 | 25 | /** |
| 28 | 26 | * Class LazyRoot |
@@ -160,6 +160,9 @@ |
||
| 160 | 160 | return true; |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | + /** |
|
| 164 | + * @param string $path |
|
| 165 | + */ |
|
| 163 | 166 | private function rmObjects($path) { |
| 164 | 167 | $children = $this->getCache()->getFolderContents($path); |
| 165 | 168 | foreach ($children as $child) { |