@@ -382,7 +382,6 @@ |
||
382 | 382 | /** |
383 | 383 | * @param \OC\Files\View $view relative to data/ |
384 | 384 | * @param string $path |
385 | - * @param string $basePath |
|
386 | 385 | */ |
387 | 386 | public static function testKeySetPreperation($view, $path) { |
388 | 387 | self::keySetPreparation($view, $path); |
@@ -118,6 +118,9 @@ discard block |
||
118 | 118 | } |
119 | 119 | } |
120 | 120 | |
121 | + /** |
|
122 | + * @param string $uid |
|
123 | + */ |
|
121 | 124 | protected function createDummyShareKeys($uid) { |
122 | 125 | $this->view->mkdir($uid . '/files_encryption/share-keys/folder1/folder2/folder3'); |
123 | 126 | $this->view->mkdir($uid . '/files_encryption/share-keys/folder2/'); |
@@ -141,6 +144,9 @@ discard block |
||
141 | 144 | } |
142 | 145 | } |
143 | 146 | |
147 | + /** |
|
148 | + * @param string $uid |
|
149 | + */ |
|
144 | 150 | protected function createDummyFileKeys($uid) { |
145 | 151 | $this->view->mkdir($uid . '/files_encryption/keyfiles/folder1/folder2/folder3'); |
146 | 152 | $this->view->mkdir($uid . '/files_encryption/keyfiles/folder2/'); |
@@ -150,6 +156,9 @@ discard block |
||
150 | 156 | $this->view->file_put_contents($uid . '/files_encryption/keyfiles/folder2/file.2.1.key' , 'data'); |
151 | 157 | } |
152 | 158 | |
159 | + /** |
|
160 | + * @param string $uid |
|
161 | + */ |
|
153 | 162 | protected function createDummyFilesInTrash($uid) { |
154 | 163 | $this->view->mkdir($uid . '/files_trashbin/share-keys'); |
155 | 164 | $this->view->mkdir($uid . '/files_trashbin/share-keys/folder1.d7437648723'); |
@@ -219,6 +228,9 @@ discard block |
||
219 | 228 | |
220 | 229 | } |
221 | 230 | |
231 | + /** |
|
232 | + * @param string $uid |
|
233 | + */ |
|
222 | 234 | protected function verifyFilesInTrash($uid) { |
223 | 235 | // share keys |
224 | 236 | $this->view->file_exists($uid . '/files_trashbin/keys/file1.d5457864/' . self::TEST_ENCRYPTION_MIGRATION_USER1 . '.shareKey.d5457864' , 'data'); |
@@ -231,6 +243,9 @@ discard block |
||
231 | 243 | $this->view->file_exists($uid . '/files_trashbin/keyfiles/folder1.d7437648723/file2/fileKey' , 'data'); |
232 | 244 | } |
233 | 245 | |
246 | + /** |
|
247 | + * @param string $uid |
|
248 | + */ |
|
234 | 249 | protected function verifyNewKeyPath($uid) { |
235 | 250 | // private key |
236 | 251 | if ($uid !== '') { |
@@ -567,6 +567,9 @@ discard block |
||
567 | 567 | |
568 | 568 | } |
569 | 569 | |
570 | + /** |
|
571 | + * @param string $extension |
|
572 | + */ |
|
570 | 573 | function getBackupPath($extension) { |
571 | 574 | $encPath = '/' . self::TEST_ENCRYPTION_UTIL_USER1 . '/files_encryption'; |
572 | 575 | $encFolderContent = $this->view->getDirectoryContent($encPath); |
@@ -662,6 +665,10 @@ discard block |
||
662 | 665 | * dummy class extends \OCA\Files_Encryption\Util to access protected methods for testing |
663 | 666 | */ |
664 | 667 | class DummyUtilClass extends \OCA\Files_Encryption\Util { |
668 | + |
|
669 | + /** |
|
670 | + * @param string $uid |
|
671 | + */ |
|
665 | 672 | public function testIsMountPointApplicableToUser($mount, $uid) { |
666 | 673 | return $this->isMountPointApplicableToUser($mount, $uid); |
667 | 674 | } |
@@ -90,6 +90,9 @@ |
||
90 | 90 | return $this->token; |
91 | 91 | } |
92 | 92 | |
93 | + /** |
|
94 | + * @return resource |
|
95 | + */ |
|
93 | 96 | public function getPassword() { |
94 | 97 | return $this->password; |
95 | 98 | } |
@@ -30,7 +30,6 @@ |
||
30 | 30 | namespace OCA\Files_Sharing\Controllers; |
31 | 31 | |
32 | 32 | use OC; |
33 | -use OC\Files\Filesystem; |
|
34 | 33 | use OC_Files; |
35 | 34 | use OC_Util; |
36 | 35 | use OCP; |
@@ -138,6 +138,9 @@ |
||
138 | 138 | return true; |
139 | 139 | } |
140 | 140 | |
141 | + /** |
|
142 | + * @param string $target |
|
143 | + */ |
|
141 | 144 | public static function getSharesFromItem($target) { |
142 | 145 | $result = array(); |
143 | 146 | $owner = \OC\Files\Filesystem::getOwner($target); |
@@ -14,7 +14,6 @@ |
||
14 | 14 | use OCA\Files_Sharing\Application; |
15 | 15 | use OCP\AppFramework\Http\NotFoundResponse; |
16 | 16 | use OCP\AppFramework\IAppContainer; |
17 | -use OCP\Files; |
|
18 | 17 | use OCP\AppFramework\Http\RedirectResponse; |
19 | 18 | use OCP\AppFramework\Http\TemplateResponse; |
20 | 19 | use OCP\Security\ISecureRandom; |
@@ -39,6 +39,9 @@ discard block |
||
39 | 39 | */ |
40 | 40 | private static $scannedVersions = false; |
41 | 41 | |
42 | + /** |
|
43 | + * @param string $filename |
|
44 | + */ |
|
42 | 45 | public static function getUidAndFilename($filename) { |
43 | 46 | $uid = \OC\Files\Filesystem::getOwner($filename); |
44 | 47 | \OC\Files\Filesystem::initMountPoints($uid); |
@@ -399,7 +402,7 @@ discard block |
||
399 | 402 | * @param string $uniqueFilename new file name to restore the file without overwriting existing files |
400 | 403 | * @param string $location location if file |
401 | 404 | * @param int $timestamp deletion time |
402 | - * @return bool |
|
405 | + * @return false|null |
|
403 | 406 | */ |
404 | 407 | private static function restoreVersions(\OC\Files\View $view, $file, $filename, $uniqueFilename, $location, $timestamp) { |
405 | 408 | |
@@ -453,7 +456,7 @@ discard block |
||
453 | 456 | * @param string $uniqueFilename new file name to restore the file without overwriting existing files |
454 | 457 | * @param string $location location of file |
455 | 458 | * @param int $timestamp deletion time |
456 | - * @return bool |
|
459 | + * @return false|null |
|
457 | 460 | */ |
458 | 461 | private static function restoreEncryptionKeys(\OC\Files\View $view, $file, $filename, $uniqueFilename, $location, $timestamp) { |
459 | 462 | |
@@ -550,9 +553,9 @@ discard block |
||
550 | 553 | |
551 | 554 | /** |
552 | 555 | * @param \OC\Files\View $view |
553 | - * @param $file |
|
554 | - * @param $filename |
|
555 | - * @param $timestamp |
|
556 | + * @param string $file |
|
557 | + * @param string $filename |
|
558 | + * @param integer|null $timestamp |
|
556 | 559 | * @return int |
557 | 560 | */ |
558 | 561 | private static function deleteVersions(\OC\Files\View $view, $file, $filename, $timestamp) { |
@@ -579,9 +582,9 @@ discard block |
||
579 | 582 | |
580 | 583 | /** |
581 | 584 | * @param \OC\Files\View $view |
582 | - * @param $file |
|
583 | - * @param $filename |
|
584 | - * @param $timestamp |
|
585 | + * @param string $file |
|
586 | + * @param string $filename |
|
587 | + * @param integer|null $timestamp |
|
585 | 588 | * @return int |
586 | 589 | */ |
587 | 590 | private static function deleteEncryptionKeys(\OC\Files\View $view, $file, $filename, $timestamp) { |
@@ -8,9 +8,7 @@ |
||
8 | 8 | |
9 | 9 | namespace OCA\Files_trashbin\Tests\Storage; |
10 | 10 | |
11 | -use OC\Files\Storage\Home; |
|
12 | 11 | use OC\Files\Storage\Temporary; |
13 | -use OC\Files\Mount\MountPoint; |
|
14 | 12 | use OC\Files\Filesystem; |
15 | 13 | |
16 | 14 | class Storage extends \Test\TestCase { |
@@ -531,6 +531,7 @@ |
||
531 | 531 | |
532 | 532 | /** |
533 | 533 | * Erase a file's versions which exceed the set quota |
534 | + * @param integer $versionsSize |
|
534 | 535 | */ |
535 | 536 | private static function expire($filename, $versionsSize = null, $offset = 0) { |
536 | 537 | $config = \OC::$server->getConfig(); |