aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-09-16 20:29:48 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-09-16 20:29:48 +0200
commit03b969fb9597ae86564ad5f8a83d6fd64bd1d65a (patch)
treed27040197d5bcd91c29e8c3dda779d2ba254013a
parente7ac9bb2d8a14ccbf3305de4af851ed1476b205e (diff)
downloadnextcloud-server-03b969fb9597ae86564ad5f8a83d6fd64bd1d65a.tar.gz
nextcloud-server-03b969fb9597ae86564ad5f8a83d6fd64bd1d65a.zip
chore: Improve typing and phpdoc comments
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/FileTest.php10
-rw-r--r--apps/files_trashbin/lib/Trashbin.php5
-rw-r--r--lib/public/Files/Storage/IStorage.php3
3 files changed, 7 insertions, 11 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/FileTest.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php
index 07128a1c7af..55a6783225d 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php
@@ -72,10 +72,7 @@ class FileTest extends TestCase {
parent::tearDown();
}
- /**
- * @return MockObject|IStorage
- */
- private function getMockStorage() {
+ private function getMockStorage(): MockObject&IStorage {
$storage = $this->getMockBuilder(IStorage::class)
->disableOriginalConstructor()
->getMock();
@@ -84,10 +81,7 @@ class FileTest extends TestCase {
return $storage;
}
- /**
- * @param string $string
- */
- private function getStream($string) {
+ private function getStream(string $string) {
$stream = fopen('php://temp', 'r+');
fwrite($stream, $string);
fseek($stream, 0);
diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php
index b83a81972e1..544bc877d70 100644
--- a/apps/files_trashbin/lib/Trashbin.php
+++ b/apps/files_trashbin/lib/Trashbin.php
@@ -140,6 +140,7 @@ class Trashbin {
}
}
+ /** @param string $user */
private static function setUpTrash($user): void {
$view = new View('/' . $user);
if (!$view->is_dir('files_trashbin')) {
@@ -163,10 +164,10 @@ class Trashbin {
* @param string $sourcePath
* @param string $owner
* @param string $targetPath
- * @param $user
+ * @param string $user
* @param int $timestamp
*/
- private static function copyFilesToUser($sourcePath, $owner, $targetPath, $user, $timestamp) {
+ private static function copyFilesToUser($sourcePath, $owner, $targetPath, $user, $timestamp): void {
self::setUpTrash($owner);
$targetFilename = basename($targetPath);
diff --git a/lib/public/Files/Storage/IStorage.php b/lib/public/Files/Storage/IStorage.php
index e009f2b6fae..d2fd3b75553 100644
--- a/lib/public/Files/Storage/IStorage.php
+++ b/lib/public/Files/Storage/IStorage.php
@@ -407,7 +407,8 @@ interface IStorage {
/**
* @since 12.0.0
- * @return mixed
+ * @since 31.0.0 moved from Storage to IStorage
+ * @return bool
*/
public function needsPartFile();