summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin
diff options
context:
space:
mode:
authorScrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>2015-12-07 20:08:20 +0000
committerScrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>2015-12-07 20:08:20 +0000
commit0f1be1b60150cc92e7616834d58271ffddc19762 (patch)
tree7c21bd5e88cdab86c7f6c6ee1d7810cbefafac12 /apps/files_trashbin
parentb15d77c93459743e5e3e29ebefeba0d6fca11b96 (diff)
downloadnextcloud-server-0f1be1b60150cc92e7616834d58271ffddc19762.tar.gz
nextcloud-server-0f1be1b60150cc92e7616834d58271ffddc19762.zip
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r--apps/files_trashbin/lib/trashbin.php13
-rw-r--r--apps/files_trashbin/tests/trashbin.php19
2 files changed, 23 insertions, 9 deletions
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 676252e1634..bd6798f0eff 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -147,7 +147,7 @@ class Trashbin {
*
* @param string $sourcePath
* @param string $owner
- * @param $targetPath
+ * @param string $targetPath
* @param $user
* @param integer $timestamp
*/
@@ -410,7 +410,7 @@ class Trashbin {
* @param string $uniqueFilename new file name to restore the file without overwriting existing files
* @param string $location location if file
* @param int $timestamp deletion time
- * @return bool
+ * @return false|null
*/
private static function restoreVersions(\OC\Files\View $view, $file, $filename, $uniqueFilename, $location, $timestamp) {
@@ -500,9 +500,10 @@ class Trashbin {
/**
* @param \OC\Files\View $view
- * @param $file
- * @param $filename
- * @param $timestamp
+ * @param string $file
+ * @param string $filename
+ * @param integer|null $timestamp
+ * @param string $user
* @return int
*/
private static function deleteVersions(\OC\Files\View $view, $file, $filename, $timestamp, $user) {
@@ -684,7 +685,7 @@ class Trashbin {
*
* @param array $files list of files sorted by mtime
* @param string $user
- * @return array size of deleted files and number of deleted files
+ * @return integer[] size of deleted files and number of deleted files
*/
public static function deleteExpiredFiles($files, $user) {
$application = new Application();
diff --git a/apps/files_trashbin/tests/trashbin.php b/apps/files_trashbin/tests/trashbin.php
index c53ed8d8a9b..db7e7e6e840 100644
--- a/apps/files_trashbin/tests/trashbin.php
+++ b/apps/files_trashbin/tests/trashbin.php
@@ -248,8 +248,8 @@ class Test_Trashbin extends \Test\TestCase {
/**
* verify that the array contains the expected results
- * @param array $result
- * @param array $expected
+ * @param OCP\Files\FileInfo[] $result
+ * @param string[] $expected
*/
private function verifyArray($result, $expected) {
$this->assertSame(count($expected), count($result));
@@ -268,6 +268,11 @@ class Test_Trashbin extends \Test\TestCase {
}
}
+ /**
+ * @param OCP\Files\FileInfo[] $files
+ * @param string $trashRoot
+ * @param integer $expireDate
+ */
private function manipulateDeleteTime($files, $trashRoot, $expireDate) {
$counter = 0;
foreach ($files as &$file) {
@@ -627,7 +632,6 @@ class Test_Trashbin extends \Test\TestCase {
/**
* @param string $user
* @param bool $create
- * @param bool $password
*/
public static function loginHelper($user, $create = false) {
if ($create) {
@@ -650,11 +654,20 @@ class Test_Trashbin extends \Test\TestCase {
// just a dummy class to make protected methods available for testing
class TrashbinForTesting extends Files_Trashbin\Trashbin {
+
+ /**
+ * @param OCP\Files\FileInfo[] $files
+ * @param integer $limit
+ */
public function dummyDeleteExpiredFiles($files, $limit) {
// dummy value for $retention_obligation because it is not needed here
return parent::deleteExpiredFiles($files, \Test_Trashbin::TEST_TRASHBIN_USER1, $limit, 0);
}
+ /**
+ * @param OCP\Files\FileInfo[] $files
+ * @param integer $availableSpace
+ */
public function dummyDeleteFiles($files, $availableSpace) {
return parent::deleteFiles($files, \Test_Trashbin::TEST_TRASHBIN_USER1, $availableSpace);
}