@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | * @When /^sending "([^"]*)" to "([^"]*)" with$/ |
121 | 121 | * @param string $verb |
122 | 122 | * @param string $url |
123 | - * @param \Behat\Gherkin\Node\TableNode $body |
|
123 | + * @param null|Behat\Gherkin\Node\TableNode $body |
|
124 | 124 | */ |
125 | 125 | public function sendingToWith($verb, $url, $body) { |
126 | 126 | $fullUrl = $this->baseUrl . "v{$this->apiVersion}.php" . $url; |
@@ -143,6 +143,10 @@ discard block |
||
143 | 143 | } |
144 | 144 | } |
145 | 145 | |
146 | + /** |
|
147 | + * @param string $possibleUrl |
|
148 | + * @param string $finalPart |
|
149 | + */ |
|
146 | 150 | public function isExpectedUrl($possibleUrl, $finalPart){ |
147 | 151 | $baseUrlChopped = substr($this->baseUrl, 0, -4); |
148 | 152 | $endCharacter = strlen($baseUrlChopped) + strlen($finalPart); |
@@ -150,6 +150,10 @@ |
||
150 | 150 | PHPUnit_Framework_Assert::assertEquals(200, $this->response->getStatusCode()); |
151 | 151 | } |
152 | 152 | |
153 | + /** |
|
154 | + * @param string $user |
|
155 | + * @param string $group |
|
156 | + */ |
|
153 | 157 | public function userBelongsToGroup($user, $group) { |
154 | 158 | $fullUrl = $this->baseUrl . "v2.php/cloud/users/$user/groups"; |
155 | 159 | $client = new Client(); |
@@ -160,6 +160,12 @@ discard block |
||
160 | 160 | PHPUnit_Framework_Assert::assertEquals(200, $this->response->getStatusCode()); |
161 | 161 | } |
162 | 162 | |
163 | + /** |
|
164 | + * @param string $user |
|
165 | + * @param string $path |
|
166 | + * @param integer $shareType |
|
167 | + * @param string $shareWith |
|
168 | + */ |
|
163 | 169 | public function createShare($user, |
164 | 170 | $path = null, |
165 | 171 | $shareType = null, |
@@ -284,6 +290,9 @@ discard block |
||
284 | 290 | PHPUnit_Framework_Assert::assertEquals(False, $this->isFieldInResponse('share_with', "$user")); |
285 | 291 | } |
286 | 292 | |
293 | + /** |
|
294 | + * @param string $userOrGroup |
|
295 | + */ |
|
287 | 296 | public function isUserOrGroupInSharedData($userOrGroup){ |
288 | 297 | $data = $this->response->xml()->data[0]; |
289 | 298 | foreach($data as $element) { |
@@ -1,7 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | use GuzzleHttp\Client; |
4 | -use GuzzleHttp\Message\ResponseInterface; |
|
5 | 4 | |
6 | 5 | require __DIR__ . '/../../vendor/autoload.php'; |
7 | 6 |
@@ -22,6 +22,9 @@ discard block |
||
22 | 22 | $this->davPath = $davPath; |
23 | 23 | } |
24 | 24 | |
25 | + /** |
|
26 | + * @param string $method |
|
27 | + */ |
|
25 | 28 | public function makeDavRequest($user, $method, $path, $headers, $body = null){ |
26 | 29 | $fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath . "$path"; |
27 | 30 | $client = new GClient(); |
@@ -295,6 +298,12 @@ discard block |
||
295 | 298 | |
296 | 299 | |
297 | 300 | /*Returns the elements of a propfind, $folderDepth requires 1 to see elements without children*/ |
301 | + |
|
302 | + /** |
|
303 | + * @param string $user |
|
304 | + * @param string $path |
|
305 | + * @param integer $folderDepth |
|
306 | + */ |
|
298 | 307 | public function listFolder($user, $path, $folderDepth, $properties = null){ |
299 | 308 | $fullUrl = substr($this->baseUrl, 0, -4); |
300 | 309 | |
@@ -474,6 +483,11 @@ discard block |
||
474 | 483 | } |
475 | 484 | |
476 | 485 | /*Set the elements of a proppatch, $folderDepth requires 1 to see elements without children*/ |
486 | + |
|
487 | + /** |
|
488 | + * @param integer $favOrUnfav |
|
489 | + * @param integer $folderDepth |
|
490 | + */ |
|
477 | 491 | public function changeFavStateOfAnElement($user, $path, $favOrUnfav, $folderDepth, $properties = null){ |
478 | 492 | $fullUrl = substr($this->baseUrl, 0, -4); |
479 | 493 | $settings = array( |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | |
392 | 392 | /** |
393 | 393 | * returns the internal ownCloud name for the given LDAP DN of the user, false on DN outside of search DN or failure |
394 | - * @param string $dn the dn of the user object |
|
394 | + * @param string $fdn the dn of the user object |
|
395 | 395 | * @param string $ldapName optional, the display name of the object |
396 | 396 | * @return string|false with with the name to use in ownCloud |
397 | 397 | */ |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | |
409 | 409 | /** |
410 | 410 | * returns an internal ownCloud name for the given LDAP DN, false on DN outside of search DN |
411 | - * @param string $dn the dn of the user object |
|
411 | + * @param string $fdn the dn of the user object |
|
412 | 412 | * @param string $ldapName optional, the display name of the object |
413 | 413 | * @param bool $isUser optional, whether it is a user object (otherwise group assumed) |
414 | 414 | * @return string|false with with the name to use in ownCloud |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | * the login filter. |
669 | 669 | * |
670 | 670 | * @param string $loginName |
671 | - * @param array $attributes optional, list of attributes to read |
|
671 | + * @param string[] $attributes optional, list of attributes to read |
|
672 | 672 | * @return array |
673 | 673 | */ |
674 | 674 | public function fetchUsersByLoginName($loginName, $attributes = array('dn')) { |
@@ -782,7 +782,7 @@ discard block |
||
782 | 782 | |
783 | 783 | /** |
784 | 784 | * @param string $filter |
785 | - * @param string|string[] $attr |
|
785 | + * @param string[] $attr |
|
786 | 786 | * @param int $limit |
787 | 787 | * @param int $offset |
788 | 788 | * @return false|int |
@@ -832,6 +832,7 @@ discard block |
||
832 | 832 | * retrieved. Results will according to the order in the array. |
833 | 833 | * @param int $limit optional, maximum results to be counted |
834 | 834 | * @param int $offset optional, a starting point |
835 | + * @param string $filter |
|
835 | 836 | * @return array|false array with the search result as first value and pagedSearchOK as |
836 | 837 | * second | false if not successful |
837 | 838 | */ |
@@ -1073,7 +1074,7 @@ discard block |
||
1073 | 1074 | |
1074 | 1075 | /** |
1075 | 1076 | * @param string $name |
1076 | - * @return bool|mixed|string |
|
1077 | + * @return string |
|
1077 | 1078 | */ |
1078 | 1079 | public function sanitizeUsername($name) { |
1079 | 1080 | if($this->connection->ldapIgnoreNamingRules) { |
@@ -1097,6 +1098,7 @@ discard block |
||
1097 | 1098 | * escapes (user provided) parts for LDAP filter |
1098 | 1099 | * @param string $input, the provided value |
1099 | 1100 | * @param bool $allowAsterisk whether in * at the beginning should be preserved |
1101 | + * @param string $input |
|
1100 | 1102 | * @return string the escaped string |
1101 | 1103 | */ |
1102 | 1104 | public function escapeFilterPart($input, $allowAsterisk = false) { |
@@ -1100,7 +1100,7 @@ |
||
1100 | 1100 | } |
1101 | 1101 | |
1102 | 1102 | /** |
1103 | - * @param array $reqs |
|
1103 | + * @param string[] $reqs |
|
1104 | 1104 | * @return bool |
1105 | 1105 | */ |
1106 | 1106 | private function checkRequirements($reqs) { |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | |
327 | 327 | /** |
328 | 328 | * http basic auth |
329 | - * @return string|false (username, or false on failure) |
|
329 | + * @return string (username, or false on failure) |
|
330 | 330 | */ |
331 | 331 | private static function loginUser() { |
332 | 332 | if(self::$isLoggedIn === true) { |
@@ -432,6 +432,7 @@ discard block |
||
432 | 432 | |
433 | 433 | /** |
434 | 434 | * Based on the requested format the response content type is set |
435 | + * @param string $format |
|
435 | 436 | */ |
436 | 437 | public static function setContentType($format = null) { |
437 | 438 | $format = is_null($format) ? self::requestedFormat() : $format; |
@@ -217,6 +217,9 @@ discard block |
||
217 | 217 | return '"' . $this->info->getEtag() . '"'; |
218 | 218 | } |
219 | 219 | |
220 | + /** |
|
221 | + * @param string $path |
|
222 | + */ |
|
220 | 223 | private function getPartFileBasePath($path) { |
221 | 224 | $partFileInStorage = \OC::$server->getConfig()->getSystemValue('part_file_in_storage', true); |
222 | 225 | if ($partFileInStorage) { |
@@ -254,6 +257,9 @@ discard block |
||
254 | 257 | return $run; |
255 | 258 | } |
256 | 259 | |
260 | + /** |
|
261 | + * @param string $path |
|
262 | + */ |
|
257 | 263 | private function emitPostHooks($exists, $path = null) { |
258 | 264 | if (is_null($path)) { |
259 | 265 | $path = $this->path; |
@@ -326,7 +332,7 @@ discard block |
||
326 | 332 | * |
327 | 333 | * If null is returned, we'll assume application/octet-stream |
328 | 334 | * |
329 | - * @return mixed |
|
335 | + * @return string |
|
330 | 336 | */ |
331 | 337 | public function getContentType() { |
332 | 338 | $mimeType = $this->info->getMimetype(); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | /** |
161 | 161 | * gets last value of autoincrement |
162 | 162 | * @param string $table The optional table name (will replace *PREFIX*) and add sequence suffix |
163 | - * @return string id |
|
163 | + * @return integer id |
|
164 | 164 | * @throws \OC\DatabaseException |
165 | 165 | * |
166 | 166 | * \Doctrine\DBAL\Connection lastInsertId |
@@ -196,7 +196,6 @@ discard block |
||
196 | 196 | /** |
197 | 197 | * saves database schema to xml file |
198 | 198 | * @param string $file name of file |
199 | - * @param int $mode |
|
200 | 199 | * @return bool |
201 | 200 | * |
202 | 201 | * TODO: write more documentation |