]> source.dussan.org Git - nextcloud-server.git/commitdiff
Adapt types of subclasses
authorCôme Chilliet <come.chilliet@nextcloud.com>
Mon, 19 Dec 2022 13:03:09 +0000 (14:03 +0100)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Sat, 1 Apr 2023 13:12:05 +0000 (13:12 +0000)
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
lib/private/Files/Storage/Common.php
lib/private/Files/Storage/DAV.php
lib/private/Files/Storage/Wrapper/Encoding.php
lib/private/Files/Storage/Wrapper/Jail.php
lib/private/LargeFileHelper.php

index 737c1e9d51e31cdf451ed2c0d2dc2dd063ff7521..3473eebc4a0e14c0fcb444923fff85f6a342474e 100644 (file)
@@ -477,7 +477,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
         * get the free space in the storage
         *
         * @param string $path
-        * @return int|false
+        * @return int|float|false
         */
        public function free_space($path) {
                return \OCP\Files\FileInfo::SPACE_UNKNOWN;
index fcb07cb9748dae78cb7322dd0f207c80d6392e21..0c4a81b7491bcd11505ac259d4405ebfbf6302a8 100644 (file)
@@ -486,7 +486,7 @@ class DAV extends Common {
        /**
         * @param string $path
         * @param mixed $data
-        * @return int|false
+        * @return int|float|false
         */
        public function file_put_contents($path, $data) {
                $path = $this->cleanPath($path);
index 6aba839d26d4d56299570b37d10259e0be48da9f..d6006f746ad4e2c31ec92ffbfd06a0a1cd561cbf 100644 (file)
@@ -311,7 +311,7 @@ class Encoding extends Wrapper {
         *
         * @param string $path
         * @param mixed $data
-        * @return int|false
+        * @return int|float|false
         */
        public function file_put_contents($path, $data) {
                return $this->storage->file_put_contents($this->findPathToUse($path), $data);
@@ -396,7 +396,7 @@ class Encoding extends Wrapper {
         * see https://www.php.net/manual/en/function.free_space.php
         *
         * @param string $path
-        * @return int|bool
+        * @return int|float|bool
         */
        public function free_space($path) {
                return $this->storage->free_space($this->findPathToUse($path));
index 4501c96d631469373040928ebeca13befbcba93b..e21a2cba244a8edda00a8e4dd895b0059b78674b 100644 (file)
@@ -259,7 +259,7 @@ class Jail extends Wrapper {
         *
         * @param string $path
         * @param mixed $data
-        * @return int|false
+        * @return int|float|false
         */
        public function file_put_contents($path, $data) {
                return $this->getWrapperStorage()->file_put_contents($this->getUnjailedPath($path), $data);
@@ -335,7 +335,7 @@ class Jail extends Wrapper {
         * see https://www.php.net/manual/en/function.free_space.php
         *
         * @param string $path
-        * @return int|bool
+        * @return int|float|bool
         */
        public function free_space($path) {
                return $this->getWrapperStorage()->free_space($this->getUnjailedPath($path));
index 2b2fed4e9f1261d66034e065fa4cfaa811bd771f..09bb959cdcf33c8b4af21f05bb19682b6f1383ba 100755 (executable)
@@ -95,7 +95,7 @@ class LargeFileHelper {
         *
         * @param string $filename Path to the file.
         *
-        * @return null|int|float Number of bytes as number (float or int) or
+        * @return int|float Number of bytes as number (float or int) or
         *                        null on failure.
         */
        public function getFileSize(string $filename): null|int|float {