@@ -144,6 +144,9 @@ |
||
144 | 144 | return true; |
145 | 145 | } |
146 | 146 | |
147 | + /** |
|
148 | + * @param string $path |
|
149 | + */ |
|
147 | 150 | public function url_stat($path) { |
148 | 151 | if (isset(self::$data[$path])) { |
149 | 152 | $size = strlen(self::$data[$path]); |
@@ -27,7 +27,6 @@ |
||
27 | 27 | use OCP\IUser; |
28 | 28 | use OCP\ILogger; |
29 | 29 | use OCP\Files\Folder; |
30 | - |
|
31 | 30 | use OC\Share20\Exception\ShareNotFound; |
32 | 31 | |
33 | 32 | /** |
@@ -477,6 +477,10 @@ |
||
477 | 477 | $this->invokePrivate($this->manager, 'verifyPassword', ['password']); |
478 | 478 | } |
479 | 479 | |
480 | + /** |
|
481 | + * @param \DateTime $expireDate |
|
482 | + * @param string $password |
|
483 | + */ |
|
480 | 484 | public function createShare($id, $type, $path, $sharedWith, $sharedBy, $shareOwner, |
481 | 485 | $permissions, $expireDate = null, $password = null) { |
482 | 486 | $share = $this->getMock('\OC\Share20\IShare'); |
@@ -1,7 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -use Behat\Behat\Context\Context; |
|
4 | -use Behat\Behat\Context\SnippetAcceptingContext; |
|
5 | 3 | use GuzzleHttp\Client; |
6 | 4 | use GuzzleHttp\Message\ResponseInterface; |
7 | 5 |
@@ -19,7 +19,6 @@ discard block |
||
19 | 19 | |
20 | 20 | /** |
21 | 21 | * @When /^creating a share with$/ |
22 | - * @param \Behat\Gherkin\Node\TableNode|null $formData |
|
23 | 22 | */ |
24 | 23 | public function creatingShare($body) { |
25 | 24 | $fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/apps/files_sharing/api/v1/shares"; |
@@ -149,6 +148,9 @@ discard block |
||
149 | 148 | PHPUnit_Framework_Assert::assertEquals(200, $this->response->getStatusCode()); |
150 | 149 | } |
151 | 150 | |
151 | + /** |
|
152 | + * @param integer $shareType |
|
153 | + */ |
|
152 | 154 | public function createShare($user, |
153 | 155 | $path = null, |
154 | 156 | $shareType = null, |
@@ -356,7 +358,6 @@ discard block |
||
356 | 358 | |
357 | 359 | /** |
358 | 360 | * @Then /^Share fields of last share match with$/ |
359 | - * @param \Behat\Gherkin\Node\TableNode|null $formData |
|
360 | 361 | */ |
361 | 362 | public function checkShareFields($body){ |
362 | 363 | if ($body instanceof \Behat\Gherkin\Node\TableNode) { |
@@ -1,9 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -use Behat\Behat\Context\Context; |
|
4 | -use Behat\Behat\Context\SnippetAcceptingContext; |
|
5 | 3 | use GuzzleHttp\Client; |
6 | -use GuzzleHttp\Message\ResponseInterface; |
|
7 | 4 | |
8 | 5 | require __DIR__ . '/../../vendor/autoload.php'; |
9 | 6 |
@@ -1,9 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -use Behat\Behat\Context\Context; |
|
4 | -use Behat\Behat\Context\SnippetAcceptingContext; |
|
5 | 3 | use GuzzleHttp\Client; |
6 | -use GuzzleHttp\Message\ResponseInterface; |
|
7 | 4 | |
8 | 5 | require __DIR__ . '/../../vendor/autoload.php'; |
9 | 6 |
@@ -21,6 +21,9 @@ discard block |
||
21 | 21 | $this->davPath = $davPath; |
22 | 22 | } |
23 | 23 | |
24 | + /** |
|
25 | + * @param string $method |
|
26 | + */ |
|
24 | 27 | public function makeDavRequest($user, $method, $path, $headers){ |
25 | 28 | $fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath . "$path"; |
26 | 29 | $client = new GClient(); |
@@ -75,6 +78,11 @@ discard block |
||
75 | 78 | } |
76 | 79 | |
77 | 80 | /*Returns the elements of a propfind, $folderDepth requires 1 to see elements without children*/ |
81 | + |
|
82 | + /** |
|
83 | + * @param string $path |
|
84 | + * @param integer $folderDepth |
|
85 | + */ |
|
78 | 86 | public function listFolder($user, $path, $folderDepth){ |
79 | 87 | $fullUrl = substr($this->baseUrl, 0, -4); |
80 | 88 |
@@ -310,7 +310,7 @@ |
||
310 | 310 | /** |
311 | 311 | * get the users email address |
312 | 312 | * |
313 | - * @return string|null |
|
313 | + * @return string |
|
314 | 314 | * @since 9.0.0 |
315 | 315 | */ |
316 | 316 | public function getEMailAddress() { |
@@ -1,7 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -use Behat\Behat\Context\Context; |
|
4 | -use Behat\Behat\Context\SnippetAcceptingContext; |
|
5 | 3 | use GuzzleHttp\Client; |
6 | 4 | use GuzzleHttp\Message\ResponseInterface; |
7 | 5 |
@@ -68,6 +68,8 @@ discard block |
||
68 | 68 | |
69 | 69 | /** |
70 | 70 | * @When /^sending "([^"]*)" to "([^"]*)"$/ |
71 | + * @param string $verb |
|
72 | + * @param string $url |
|
71 | 73 | */ |
72 | 74 | public function sendingTo($verb, $url) { |
73 | 75 | $this->sendingToWith($verb, $url, null); |
@@ -93,7 +95,7 @@ discard block |
||
93 | 95 | |
94 | 96 | /** |
95 | 97 | * @When /^sending "([^"]*)" to "([^"]*)" with$/ |
96 | - * @param \Behat\Gherkin\Node\TableNode|null $formData |
|
98 | + * @param null|Behat\Gherkin\Node\TableNode $body |
|
97 | 99 | */ |
98 | 100 | public function sendingToWith($verb, $url, $body) { |
99 | 101 | $fullUrl = $this->baseUrl . "v{$this->apiVersion}.php" . $url; |
@@ -124,6 +126,7 @@ discard block |
||
124 | 126 | |
125 | 127 | /** |
126 | 128 | * @Then /^the OCS status code should be "([^"]*)"$/ |
129 | + * @param string $statusCode |
|
127 | 130 | */ |
128 | 131 | public function theOCSStatusCodeShouldBe($statusCode) { |
129 | 132 | PHPUnit_Framework_Assert::assertEquals($statusCode, $this->getOCSResponse($this->response)); |
@@ -131,11 +134,16 @@ discard block |
||
131 | 134 | |
132 | 135 | /** |
133 | 136 | * @Then /^the HTTP status code should be "([^"]*)"$/ |
137 | + * @param string $statusCode |
|
134 | 138 | */ |
135 | 139 | public function theHTTPStatusCodeShouldBe($statusCode) { |
136 | 140 | PHPUnit_Framework_Assert::assertEquals($statusCode, $this->response->getStatusCode()); |
137 | 141 | } |
138 | 142 | |
143 | + /** |
|
144 | + * @param string $path |
|
145 | + * @param string $filename |
|
146 | + */ |
|
139 | 147 | public static function removeFile($path, $filename){ |
140 | 148 | if (file_exists("$path" . "$filename")) { |
141 | 149 | unlink("$path" . "$filename"); |
@@ -422,7 +422,7 @@ |
||
422 | 422 | /** |
423 | 423 | * remove padding |
424 | 424 | * |
425 | - * @param $padded |
|
425 | + * @param string $padded |
|
426 | 426 | * @return string|false |
427 | 427 | */ |
428 | 428 | private function removePadding($padded) { |
@@ -777,7 +777,7 @@ |
||
777 | 777 | /** |
778 | 778 | * check if path points to a files version |
779 | 779 | * |
780 | - * @param $path |
|
780 | + * @param string $path |
|
781 | 781 | * @return bool |
782 | 782 | */ |
783 | 783 | protected function isVersion($path) { |