@@ -742,11 +742,19 @@ discard block |
||
742 | 742 | } |
743 | 743 | |
744 | 744 | // case-insensitive array_search |
745 | + |
|
746 | + /** |
|
747 | + * @param string $needle |
|
748 | + */ |
|
745 | 749 | protected function array_searchi($needle, $haystack, $mem='getName') { |
746 | 750 | if(!is_array($haystack)) { |
747 | 751 | return false; |
748 | 752 | } |
749 | 753 | return array_search(strtolower($needle), array_map( |
754 | + |
|
755 | + /** |
|
756 | + * @param string $tag |
|
757 | + */ |
|
750 | 758 | function($tag) use($mem) { |
751 | 759 | return strtolower(call_user_func(array($tag, $mem))); |
752 | 760 | }, $haystack) |
@@ -771,7 +779,7 @@ discard block |
||
771 | 779 | * Get a tag by its name. |
772 | 780 | * |
773 | 781 | * @param string $name The tag name. |
774 | - * @return integer|bool The tag object's offset within the $this->tags |
|
782 | + * @return \OCP\AppFramework\Db\Entity The tag object's offset within the $this->tags |
|
775 | 783 | * array or false if it doesn't exist. |
776 | 784 | */ |
777 | 785 | private function getTagByName($name) { |
@@ -782,7 +790,7 @@ discard block |
||
782 | 790 | * Get a tag by its ID. |
783 | 791 | * |
784 | 792 | * @param string $id The tag ID to look for. |
785 | - * @return integer|bool The tag object's offset within the $this->tags |
|
793 | + * @return \OCP\AppFramework\Db\Entity The tag object's offset within the $this->tags |
|
786 | 794 | * array or false if it doesn't exist. |
787 | 795 | */ |
788 | 796 | private function getTagById($id) { |
@@ -103,7 +103,7 @@ |
||
103 | 103 | /** |
104 | 104 | * Appends a variable |
105 | 105 | * @param string $key key |
106 | - * @param mixed $value value |
|
106 | + * @param string $value value |
|
107 | 107 | * @return boolean|null |
108 | 108 | * |
109 | 109 | * This function assigns a variable in an array context. If the key already |
@@ -308,6 +308,7 @@ discard block |
||
308 | 308 | * @param array $params the parameters of the sql query |
309 | 309 | * @param int $limit the maximum number of rows |
310 | 310 | * @param int $offset from which row we want to start |
311 | + * @param string $msg |
|
311 | 312 | * @return string formatted error message string |
312 | 313 | * @since 9.1.0 |
313 | 314 | */ |
@@ -360,7 +361,7 @@ discard block |
||
360 | 361 | * Returns an db result and throws exceptions when there are more or less |
361 | 362 | * results |
362 | 363 | * @param string $sql the sql query |
363 | - * @param array $params the parameters of the sql query |
|
364 | + * @param string[] $params the parameters of the sql query |
|
364 | 365 | * @param int $limit the maximum number of rows |
365 | 366 | * @param int $offset from which row we want to start |
366 | 367 | * @throws DoesNotExistException if the item does not exist |
@@ -32,18 +32,21 @@ discard block |
||
32 | 32 | /** |
33 | 33 | * @param string $message |
34 | 34 | * @since 9.1.0 |
35 | + * @return void |
|
35 | 36 | */ |
36 | 37 | public function info($message); |
37 | 38 | |
38 | 39 | /** |
39 | 40 | * @param string $message |
40 | 41 | * @since 9.1.0 |
42 | + * @return void |
|
41 | 43 | */ |
42 | 44 | public function warning($message); |
43 | 45 | |
44 | 46 | /** |
45 | 47 | * @param int $max |
46 | 48 | * @since 9.1.0 |
49 | + * @return void |
|
47 | 50 | */ |
48 | 51 | public function startProgress($max = 0); |
49 | 52 | |
@@ -51,12 +54,13 @@ discard block |
||
51 | 54 | * @param int $step |
52 | 55 | * @param string $description |
53 | 56 | * @since 9.1.0 |
57 | + * @return void |
|
54 | 58 | */ |
55 | 59 | public function advance($step = 1, $description = ''); |
56 | 60 | |
57 | 61 | /** |
58 | - * @param int $max |
|
59 | 62 | * @since 9.1.0 |
63 | + * @return void |
|
60 | 64 | */ |
61 | 65 | public function finishProgress(); |
62 | 66 |
@@ -102,17 +102,19 @@ discard block |
||
102 | 102 | * with the same attributes |
103 | 103 | * |
104 | 104 | * @since 9.0.0 |
105 | + * @return void |
|
105 | 106 | */ |
106 | 107 | public function updateTag($tagId, $newName, $userVisible, $userAssignable); |
107 | 108 | |
108 | 109 | /** |
109 | 110 | * Delete the given tags from the database and all their relationships. |
110 | 111 | * |
111 | - * @param string|array $tagIds array of tag ids |
|
112 | + * @param string $tagIds array of tag ids |
|
112 | 113 | * |
113 | 114 | * @throws \OCP\SystemTag\TagNotFoundException if at least one tag did not exist |
114 | 115 | * |
115 | 116 | * @since 9.0.0 |
117 | + * @return void |
|
116 | 118 | */ |
117 | 119 | public function deleteTags($tagIds); |
118 | 120 | |
@@ -123,7 +125,7 @@ discard block |
||
123 | 125 | * @param ISystemTag $tag tag to check permission for |
124 | 126 | * @param IUser $user user to check permission for |
125 | 127 | * |
126 | - * @return true if the user is allowed to assign/unassign the tag, false otherwise |
|
128 | + * @return boolean if the user is allowed to assign/unassign the tag, false otherwise |
|
127 | 129 | * |
128 | 130 | * @since 9.1.0 |
129 | 131 | */ |
@@ -133,9 +135,9 @@ discard block |
||
133 | 135 | * Checks whether the given user is allowed to see the tag with the given id. |
134 | 136 | * |
135 | 137 | * @param ISystemTag $tag tag to check permission for |
136 | - * @param IUser $user user to check permission for |
|
138 | + * @param IUser $userId user to check permission for |
|
137 | 139 | * |
138 | - * @return true if the user can see the tag, false otherwise |
|
140 | + * @return boolean if the user can see the tag, false otherwise |
|
139 | 141 | * |
140 | 142 | * @since 9.1.0 |
141 | 143 | */ |
@@ -148,6 +150,7 @@ discard block |
||
148 | 150 | * @param string[] $groupIds group ids of groups that can assign/unassign the tag |
149 | 151 | * |
150 | 152 | * @since 9.1.0 |
153 | + * @return void |
|
151 | 154 | */ |
152 | 155 | public function setTagGroups(ISystemTag $tag, $groupIds); |
153 | 156 |
@@ -544,7 +544,7 @@ |
||
544 | 544 | * @param array $input The array to work on |
545 | 545 | * @param int $case Either MB_CASE_UPPER or MB_CASE_LOWER (default) |
546 | 546 | * @param string $encoding The encoding parameter is the character encoding. Defaults to UTF-8 |
547 | - * @return array |
|
547 | + * @return string |
|
548 | 548 | * @since 4.5.0 |
549 | 549 | */ |
550 | 550 | public static function mb_array_change_key_case($input, $case = MB_CASE_LOWER, $encoding = 'UTF-8') { |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | * and does not take the chroot into account ) |
201 | 201 | * |
202 | 202 | * @param string $path |
203 | - * @return \OCP\Files\Mount\IMountPoint |
|
203 | + * @return Mount\MountPoint|null |
|
204 | 204 | */ |
205 | 205 | public function getMount($path) { |
206 | 206 | return Filesystem::getMountManager()->find($this->getAbsolutePath($path)); |
@@ -963,7 +963,7 @@ discard block |
||
963 | 963 | |
964 | 964 | /** |
965 | 965 | * @param string $path |
966 | - * @return bool|string |
|
966 | + * @return string|false |
|
967 | 967 | * @throws \OCP\Files\InvalidPathException |
968 | 968 | */ |
969 | 969 | public function toTmpFile($path) { |
@@ -1078,7 +1078,7 @@ discard block |
||
1078 | 1078 | * @param string $path |
1079 | 1079 | * @param array $hooks (optional) |
1080 | 1080 | * @param mixed $extraParam (optional) |
1081 | - * @return mixed |
|
1081 | + * @return string |
|
1082 | 1082 | * @throws \Exception |
1083 | 1083 | * |
1084 | 1084 | * This method takes requests for basic filesystem functions (e.g. reading & writing |
@@ -2086,7 +2086,7 @@ discard block |
||
2086 | 2086 | |
2087 | 2087 | /** |
2088 | 2088 | * @param string $filename |
2089 | - * @return array |
|
2089 | + * @return string[] |
|
2090 | 2090 | * @throws \OC\User\NoUserException |
2091 | 2091 | * @throws NotFoundException |
2092 | 2092 | */ |
@@ -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) { |
@@ -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]); |