]> source.dussan.org Git - nextcloud-server.git/commitdiff
chore: Improve typing and phpdoc comments 48009/head
authorCôme Chilliet <come.chilliet@nextcloud.com>
Mon, 16 Sep 2024 18:29:48 +0000 (20:29 +0200)
committerCôme Chilliet <come.chilliet@nextcloud.com>
Mon, 16 Sep 2024 18:29:48 +0000 (20:29 +0200)
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
apps/dav/tests/unit/Connector/Sabre/FileTest.php
apps/files_trashbin/lib/Trashbin.php
lib/public/Files/Storage/IStorage.php

index 07128a1c7af76e7ddaa106568f13f3c7bc172f8b..55a6783225d8e3cd1ad589dd9e7aea279d3b8a0e 100644 (file)
@@ -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);
index b83a81972e1ed1b5577341feef31ffe3d6357beb..544bc877d70a6f3fa04b8aab82d3faaa17da0c12 100644 (file)
@@ -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);
index e009f2b6fae1302ab8782a765a44f9f9a9ffae44..d2fd3b7555302a4b3d0de7b6a0d35e94b4ace20c 100644 (file)
@@ -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();