@@ -218,6 +218,10 @@ |
||
218 | 218 | |
219 | 219 | } |
220 | 220 | |
221 | + /** |
|
222 | + * @param OC\Files\FileInfo[] $content |
|
223 | + * @param string[] $expected |
|
224 | + */ |
|
221 | 225 | public function verifyDirContent($content, $expected) { |
222 | 226 | foreach ($content as $c) { |
223 | 227 | if (!in_array($c['name'], $expected)) { |
@@ -246,8 +246,8 @@ discard block |
||
246 | 246 | |
247 | 247 | /** |
248 | 248 | * verify that the array contains the expected results |
249 | - * @param array $result |
|
250 | - * @param array $expected |
|
249 | + * @param OCP\Files\FileInfo[] $result |
|
250 | + * @param string[] $expected |
|
251 | 251 | */ |
252 | 252 | private function verifyArray($result, $expected) { |
253 | 253 | $this->assertSame(count($expected), count($result)); |
@@ -266,6 +266,11 @@ discard block |
||
266 | 266 | } |
267 | 267 | } |
268 | 268 | |
269 | + /** |
|
270 | + * @param OCP\Files\FileInfo[] $files |
|
271 | + * @param string $trashRoot |
|
272 | + * @param integer $expireDate |
|
273 | + */ |
|
269 | 274 | private function manipulateDeleteTime($files, $trashRoot, $expireDate) { |
270 | 275 | $counter = 0; |
271 | 276 | foreach ($files as &$file) { |
@@ -625,7 +630,6 @@ discard block |
||
625 | 630 | /** |
626 | 631 | * @param string $user |
627 | 632 | * @param bool $create |
628 | - * @param bool $password |
|
629 | 633 | */ |
630 | 634 | public static function loginHelper($user, $create = false) { |
631 | 635 | if ($create) { |
@@ -648,11 +652,20 @@ discard block |
||
648 | 652 | |
649 | 653 | // just a dummy class to make protected methods available for testing |
650 | 654 | class TrashbinForTesting extends Files_Trashbin\Trashbin { |
655 | + |
|
656 | + /** |
|
657 | + * @param OCP\Files\FileInfo[] $files |
|
658 | + * @param integer $limit |
|
659 | + */ |
|
651 | 660 | public function dummyDeleteExpiredFiles($files, $limit) { |
652 | 661 | // dummy value for $retention_obligation because it is not needed here |
653 | 662 | return parent::deleteExpiredFiles($files, \Test_Trashbin::TEST_TRASHBIN_USER1, $limit, 0); |
654 | 663 | } |
655 | 664 | |
665 | + /** |
|
666 | + * @param OCP\Files\FileInfo[] $files |
|
667 | + * @param integer $availableSpace |
|
668 | + */ |
|
656 | 669 | public function dummyDeleteFiles($files, $availableSpace) { |
657 | 670 | return parent::deleteFiles($files, \Test_Trashbin::TEST_TRASHBIN_USER1, $availableSpace); |
658 | 671 | } |
@@ -649,7 +649,7 @@ |
||
649 | 649 | /** |
650 | 650 | * Expire versions which exceed the quota |
651 | 651 | * |
652 | - * @param $filename |
|
652 | + * @param string $filename |
|
653 | 653 | * @param int|null $versionsSize |
654 | 654 | * @param int $offset |
655 | 655 | * @return bool|int|null |
@@ -73,8 +73,6 @@ |
||
73 | 73 | /** |
74 | 74 | * save the configuration value as provided |
75 | 75 | * @param string $configID |
76 | - * @param string $configKey |
|
77 | - * @param string $configValue |
|
78 | 76 | */ |
79 | 77 | protected function setValue($configID, $key, $value) { |
80 | 78 | $configHolder = new Configuration($configID); |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | |
391 | 391 | /** |
392 | 392 | * returns the internal ownCloud name for the given LDAP DN of the user, false on DN outside of search DN or failure |
393 | - * @param string $dn the dn of the user object |
|
393 | + * @param string $fdn the dn of the user object |
|
394 | 394 | * @param string $ldapName optional, the display name of the object |
395 | 395 | * @return string|false with with the name to use in ownCloud |
396 | 396 | */ |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | |
408 | 408 | /** |
409 | 409 | * returns an internal ownCloud name for the given LDAP DN, false on DN outside of search DN |
410 | - * @param string $dn the dn of the user object |
|
410 | + * @param string $fdn the dn of the user object |
|
411 | 411 | * @param string $ldapName optional, the display name of the object |
412 | 412 | * @param bool $isUser optional, whether it is a user object (otherwise group assumed) |
413 | 413 | * @return string|false with with the name to use in ownCloud |
@@ -662,7 +662,7 @@ discard block |
||
662 | 662 | * the login filter. |
663 | 663 | * |
664 | 664 | * @param string $loginName |
665 | - * @param array $attributes optional, list of attributes to read |
|
665 | + * @param string[] $attributes optional, list of attributes to read |
|
666 | 666 | * @return array |
667 | 667 | */ |
668 | 668 | public function fetchUsersByLoginName($loginName, $attributes = array('dn')) { |
@@ -768,7 +768,7 @@ discard block |
||
768 | 768 | |
769 | 769 | /** |
770 | 770 | * @param string $filter |
771 | - * @param string|string[] $attr |
|
771 | + * @param string[] $attr |
|
772 | 772 | * @param int $limit |
773 | 773 | * @param int $offset |
774 | 774 | * @return false|int |
@@ -818,6 +818,7 @@ discard block |
||
818 | 818 | * retrieved. Results will according to the order in the array. |
819 | 819 | * @param int $limit optional, maximum results to be counted |
820 | 820 | * @param int $offset optional, a starting point |
821 | + * @param string $filter |
|
821 | 822 | * @return array|false array with the search result as first value and pagedSearchOK as |
822 | 823 | * second | false if not successful |
823 | 824 | */ |
@@ -1059,7 +1060,7 @@ discard block |
||
1059 | 1060 | |
1060 | 1061 | /** |
1061 | 1062 | * @param string $name |
1062 | - * @return bool|mixed|string |
|
1063 | + * @return string |
|
1063 | 1064 | */ |
1064 | 1065 | public function sanitizeUsername($name) { |
1065 | 1066 | if($this->connection->ldapIgnoreNamingRules) { |
@@ -1083,6 +1084,7 @@ discard block |
||
1083 | 1084 | * escapes (user provided) parts for LDAP filter |
1084 | 1085 | * @param string $input, the provided value |
1085 | 1086 | * @param bool $allowAsterisk whether in * at the beginning should be preserved |
1087 | + * @param string $input |
|
1086 | 1088 | * @return string the escaped string |
1087 | 1089 | */ |
1088 | 1090 | public function escapeFilterPart($input, $allowAsterisk = false) { |
@@ -1530,7 +1532,7 @@ discard block |
||
1530 | 1532 | |
1531 | 1533 | /** |
1532 | 1534 | * Check whether the most recent paged search was successful. It flushed the state var. Use it always after a possible paged search. |
1533 | - * @return boolean|null true on success, null or false otherwise |
|
1535 | + * @return boolean true on success, null or false otherwise |
|
1534 | 1536 | */ |
1535 | 1537 | public function getPagedSearchResultState() { |
1536 | 1538 | $result = $this->pagedSearchedSuccessful; |
@@ -1545,7 +1547,7 @@ discard block |
||
1545 | 1547 | * @param string[] $attr optional, when a certain attribute shall be filtered outside |
1546 | 1548 | * @param int $limit |
1547 | 1549 | * @param int $offset |
1548 | - * @return bool|true |
|
1550 | + * @return boolean |
|
1549 | 1551 | */ |
1550 | 1552 | private function initPagedSearch($filter, $bases, $attr, $limit, $offset) { |
1551 | 1553 | $pagedSearchOK = false; |
@@ -68,7 +68,7 @@ |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
71 | - * @return int |
|
71 | + * @return string |
|
72 | 72 | */ |
73 | 73 | static private function getRefreshInterval() { |
74 | 74 | //defaults to every hour |
@@ -864,7 +864,7 @@ discard block |
||
864 | 864 | * @param integer $filterType int, for which use case the filter shall be created |
865 | 865 | * can be any of self::LFILTER_USER_LIST, self::LFILTER_LOGIN or |
866 | 866 | * self::LFILTER_GROUP_LIST |
867 | - * @return string|false string with the filter on success, false otherwise |
|
867 | + * @return string string with the filter on success, false otherwise |
|
868 | 868 | * @throws \Exception |
869 | 869 | */ |
870 | 870 | private function composeLdapFilter($filterType) { |
@@ -1107,7 +1107,7 @@ discard block |
||
1107 | 1107 | } |
1108 | 1108 | |
1109 | 1109 | /** |
1110 | - * @param array $reqs |
|
1110 | + * @param string[] $reqs |
|
1111 | 1111 | * @return bool |
1112 | 1112 | */ |
1113 | 1113 | private function checkRequirements($reqs) { |
@@ -149,8 +149,8 @@ |
||
149 | 149 | * Get a list of all users |
150 | 150 | * |
151 | 151 | * @param string $search |
152 | - * @param null|int $limit |
|
153 | - * @param null|int $offset |
|
152 | + * @param integer $limit |
|
153 | + * @param integer $offset |
|
154 | 154 | * @return string[] an array of all uids |
155 | 155 | */ |
156 | 156 | public function getUsers($search = '', $limit = 10, $offset = 0) { |
@@ -118,6 +118,9 @@ discard block |
||
118 | 118 | echo "License updated: $path" . PHP_EOL; |
119 | 119 | } |
120 | 120 | |
121 | + /** |
|
122 | + * @param string $source |
|
123 | + */ |
|
121 | 124 | private function isMITLicensed($source) { |
122 | 125 | $lines = explode(PHP_EOL, $source); |
123 | 126 | while(!empty($lines)) { |
@@ -131,6 +134,9 @@ discard block |
||
131 | 134 | return false; |
132 | 135 | } |
133 | 136 | |
137 | + /** |
|
138 | + * @param string $source |
|
139 | + */ |
|
134 | 140 | private function eatOldLicense($source) { |
135 | 141 | $lines = explode(PHP_EOL, $source); |
136 | 142 | while(!empty($lines)) { |