@@ -303,6 +303,7 @@ |
||
303 | 303 | * get default share folder |
304 | 304 | * |
305 | 305 | * @param \OC\Files\View |
306 | + * @param View $view |
|
306 | 307 | * @return string |
307 | 308 | */ |
308 | 309 | public static function getShareFolder($view = null) { |
@@ -338,6 +338,9 @@ discard block |
||
338 | 338 | } |
339 | 339 | } |
340 | 340 | |
341 | + /** |
|
342 | + * @param string $root |
|
343 | + */ |
|
341 | 344 | static public function init($user, $root) { |
342 | 345 | if (self::$defaultInstance) { |
343 | 346 | return false; |
@@ -521,7 +524,7 @@ discard block |
||
521 | 524 | /** |
522 | 525 | * mount an \OC\Files\Storage\Storage in our virtual filesystem |
523 | 526 | * |
524 | - * @param \OC\Files\Storage\Storage|string $class |
|
527 | + * @param string $class |
|
525 | 528 | * @param array $arguments |
526 | 529 | * @param string $mountpoint |
527 | 530 | */ |
@@ -653,6 +656,9 @@ discard block |
||
653 | 656 | return self::$defaultInstance->is_dir($path); |
654 | 657 | } |
655 | 658 | |
659 | + /** |
|
660 | + * @param string $path |
|
661 | + */ |
|
656 | 662 | static public function is_file($path) { |
657 | 663 | return self::$defaultInstance->is_file($path); |
658 | 664 | } |
@@ -665,6 +671,9 @@ discard block |
||
665 | 671 | return self::$defaultInstance->filetype($path); |
666 | 672 | } |
667 | 673 | |
674 | + /** |
|
675 | + * @param string $path |
|
676 | + */ |
|
668 | 677 | static public function filesize($path) { |
669 | 678 | return self::$defaultInstance->filesize($path); |
670 | 679 | } |
@@ -677,6 +686,9 @@ discard block |
||
677 | 686 | return self::$defaultInstance->isCreatable($path); |
678 | 687 | } |
679 | 688 | |
689 | + /** |
|
690 | + * @param string $path |
|
691 | + */ |
|
680 | 692 | static public function isReadable($path) { |
681 | 693 | return self::$defaultInstance->isReadable($path); |
682 | 694 | } |
@@ -689,6 +701,9 @@ discard block |
||
689 | 701 | return self::$defaultInstance->isDeletable($path); |
690 | 702 | } |
691 | 703 | |
704 | + /** |
|
705 | + * @param string $path |
|
706 | + */ |
|
692 | 707 | static public function isSharable($path) { |
693 | 708 | return self::$defaultInstance->isSharable($path); |
694 | 709 | } |
@@ -706,6 +721,7 @@ discard block |
||
706 | 721 | } |
707 | 722 | |
708 | 723 | /** |
724 | + * @param string $path |
|
709 | 725 | * @return string |
710 | 726 | */ |
711 | 727 | static public function file_get_contents($path) { |
@@ -728,6 +744,10 @@ discard block |
||
728 | 744 | return self::$defaultInstance->copy($path1, $path2); |
729 | 745 | } |
730 | 746 | |
747 | + /** |
|
748 | + * @param string $path |
|
749 | + * @param string $mode |
|
750 | + */ |
|
731 | 751 | static public function fopen($path, $mode) { |
732 | 752 | return self::$defaultInstance->fopen($path, $mode); |
733 | 753 | } |
@@ -743,6 +763,9 @@ discard block |
||
743 | 763 | return self::$defaultInstance->fromTmpFile($tmpFile, $path); |
744 | 764 | } |
745 | 765 | |
766 | + /** |
|
767 | + * @param string $path |
|
768 | + */ |
|
746 | 769 | static public function getMimeType($path) { |
747 | 770 | return self::$defaultInstance->getMimeType($path); |
748 | 771 | } |
@@ -755,6 +778,9 @@ discard block |
||
755 | 778 | return self::$defaultInstance->free_space($path); |
756 | 779 | } |
757 | 780 | |
781 | + /** |
|
782 | + * @param string $query |
|
783 | + */ |
|
758 | 784 | static public function search($query) { |
759 | 785 | return self::$defaultInstance->search($query); |
760 | 786 | } |
@@ -868,7 +894,7 @@ discard block |
||
868 | 894 | * @param string $path |
869 | 895 | * @param boolean $includeMountPoints whether to add mountpoint sizes, |
870 | 896 | * defaults to true |
871 | - * @return \OC\Files\FileInfo|bool False if file does not exist |
|
897 | + * @return \OCP\Files\FileInfo|null False if file does not exist |
|
872 | 898 | */ |
873 | 899 | public static function getFileInfo($path, $includeMountPoints = true) { |
874 | 900 | return self::$defaultInstance->getFileInfo($path, $includeMountPoints); |
@@ -99,7 +99,7 @@ |
||
99 | 99 | * @param string $path |
100 | 100 | * @param View $view |
101 | 101 | * @param SharedMount[] $mountpoints |
102 | - * @return mixed |
|
102 | + * @return string |
|
103 | 103 | */ |
104 | 104 | private function generateUniqueTarget($path, $view, array $mountpoints) { |
105 | 105 | $pathinfo = pathinfo($path); |
@@ -89,6 +89,9 @@ |
||
89 | 89 | $this->user = $user; |
90 | 90 | } |
91 | 91 | |
92 | + /** |
|
93 | + * @param string $tagId |
|
94 | + */ |
|
92 | 95 | function createFile($tagId, $data = null) { |
93 | 96 | try { |
94 | 97 | $tags = $this->tagManager->getTagsByIds([$tagId]); |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | |
398 | 398 | /** |
399 | 399 | * returns the internal ownCloud name for the given LDAP DN of the user, false on DN outside of search DN or failure |
400 | - * @param string $dn the dn of the user object |
|
400 | + * @param string $fdn the dn of the user object |
|
401 | 401 | * @param string $ldapName optional, the display name of the object |
402 | 402 | * @return string|false with with the name to use in ownCloud |
403 | 403 | */ |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | |
415 | 415 | /** |
416 | 416 | * returns an internal ownCloud name for the given LDAP DN, false on DN outside of search DN |
417 | - * @param string $dn the dn of the user object |
|
417 | + * @param string $fdn the dn of the user object |
|
418 | 418 | * @param string $ldapName optional, the display name of the object |
419 | 419 | * @param bool $isUser optional, whether it is a user object (otherwise group assumed) |
420 | 420 | * @return string|false with with the name to use in ownCloud |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | * the login filter. |
675 | 675 | * |
676 | 676 | * @param string $loginName |
677 | - * @param array $attributes optional, list of attributes to read |
|
677 | + * @param string[] $attributes optional, list of attributes to read |
|
678 | 678 | * @return array |
679 | 679 | */ |
680 | 680 | public function fetchUsersByLoginName($loginName, $attributes = array('dn')) { |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | |
748 | 748 | /** |
749 | 749 | * @param string $filter |
750 | - * @param string|string[] $attr |
|
750 | + * @param string[] $attr |
|
751 | 751 | * @param int $limit |
752 | 752 | * @param int $offset |
753 | 753 | * @return array |
@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | |
796 | 796 | /** |
797 | 797 | * @param string $filter |
798 | - * @param string|string[] $attr |
|
798 | + * @param string[] $attr |
|
799 | 799 | * @param int $limit |
800 | 800 | * @param int $offset |
801 | 801 | * @return false|int |
@@ -845,6 +845,7 @@ discard block |
||
845 | 845 | * retrieved. Results will according to the order in the array. |
846 | 846 | * @param int $limit optional, maximum results to be counted |
847 | 847 | * @param int $offset optional, a starting point |
848 | + * @param string $filter |
|
848 | 849 | * @return array|false array with the search result as first value and pagedSearchOK as |
849 | 850 | * second | false if not successful |
850 | 851 | */ |
@@ -891,7 +892,7 @@ discard block |
||
891 | 892 | * @param bool $pagedSearchOK whether a paged search has been executed |
892 | 893 | * @param bool $skipHandling required for paged search when cookies to |
893 | 894 | * prior results need to be gained |
894 | - * @return bool cookie validity, true if we have more pages, false otherwise. |
|
895 | + * @return null|boolean cookie validity, true if we have more pages, false otherwise. |
|
895 | 896 | */ |
896 | 897 | private function processPagedSearchStatus($sr, $filter, $base, $iFoundItems, $limit, $offset, $pagedSearchOK, $skipHandling) { |
897 | 898 | $cookie = null; |
@@ -1100,7 +1101,7 @@ discard block |
||
1100 | 1101 | |
1101 | 1102 | /** |
1102 | 1103 | * @param string $name |
1103 | - * @return bool|mixed|string |
|
1104 | + * @return string |
|
1104 | 1105 | */ |
1105 | 1106 | public function sanitizeUsername($name) { |
1106 | 1107 | if($this->connection->ldapIgnoreNamingRules) { |
@@ -1124,6 +1125,7 @@ discard block |
||
1124 | 1125 | * escapes (user provided) parts for LDAP filter |
1125 | 1126 | * @param string $input, the provided value |
1126 | 1127 | * @param bool $allowAsterisk whether in * at the beginning should be preserved |
1128 | + * @param string $input |
|
1127 | 1129 | * @return string the escaped string |
1128 | 1130 | */ |
1129 | 1131 | public function escapeFilterPart($input, $allowAsterisk = false) { |
@@ -1104,7 +1104,7 @@ |
||
1104 | 1104 | } |
1105 | 1105 | |
1106 | 1106 | /** |
1107 | - * @param array $reqs |
|
1107 | + * @param string[] $reqs |
|
1108 | 1108 | * @return bool |
1109 | 1109 | */ |
1110 | 1110 | private function checkRequirements($reqs) { |
@@ -151,7 +151,6 @@ |
||
151 | 151 | /** |
152 | 152 | * saves database schema to xml file |
153 | 153 | * @param string $file name of file |
154 | - * @param int $mode |
|
155 | 154 | * @return bool |
156 | 155 | * |
157 | 156 | * TODO: write more documentation |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | /** |
73 | 73 | * @param array $entry |
74 | - * @return array |
|
74 | + * @return string |
|
75 | 75 | */ |
76 | 76 | protected function formatCacheEntry($entry) { |
77 | 77 | if (isset($entry['path'])) { |
@@ -190,6 +190,9 @@ discard block |
||
190 | 190 | return $this->cache->getStatus($this->getSourcePath($file)); |
191 | 191 | } |
192 | 192 | |
193 | + /** |
|
194 | + * @param \OCP\Files\Cache\ICacheEntry[] $results |
|
195 | + */ |
|
193 | 196 | private function formatSearchResults($results) { |
194 | 197 | $results = array_filter($results, array($this, 'filterCacheEntry')); |
195 | 198 | $results = array_values($results); |
@@ -53,7 +53,7 @@ |
||
53 | 53 | * Wrapper around file_put_contents($filename, $data) |
54 | 54 | * |
55 | 55 | * @param string $filename |
56 | - * @param $data |
|
56 | + * @param string $data |
|
57 | 57 | * @return int|false |
58 | 58 | */ |
59 | 59 | public function file_put_contents($filename, $data) { |