summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-12-19 14:03:09 +0100
committerMichaIng <micha@dietpi.com>2023-04-01 14:20:24 +0200
commit1740311283b75d7bda3c92c5ef6d05096485bb1d (patch)
treed5be4ba6efdb56aebd4108607ec9a72dc61c8d43
parented863fb47c1ecdd5c47ade2a5634f14470406790 (diff)
downloadnextcloud-server-1740311283b75d7bda3c92c5ef6d05096485bb1d.tar.gz
nextcloud-server-1740311283b75d7bda3c92c5ef6d05096485bb1d.zip
Adapt types of subclasses
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--lib/private/Files/Storage/Common.php2
-rw-r--r--lib/private/Files/Storage/DAV.php2
-rw-r--r--lib/private/Files/Storage/Wrapper/Encoding.php4
-rw-r--r--lib/private/Files/Storage/Wrapper/Jail.php4
-rwxr-xr-xlib/private/LargeFileHelper.php2
5 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index 737c1e9d51e..3473eebc4a0 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -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;
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php
index fcb07cb9748..0c4a81b7491 100644
--- a/lib/private/Files/Storage/DAV.php
+++ b/lib/private/Files/Storage/DAV.php
@@ -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);
diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php
index 6aba839d26d..d6006f746ad 100644
--- a/lib/private/Files/Storage/Wrapper/Encoding.php
+++ b/lib/private/Files/Storage/Wrapper/Encoding.php
@@ -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));
diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php
index 4501c96d631..e21a2cba244 100644
--- a/lib/private/Files/Storage/Wrapper/Jail.php
+++ b/lib/private/Files/Storage/Wrapper/Jail.php
@@ -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));
diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php
index 2b2fed4e9f1..09bb959cdcf 100755
--- a/lib/private/LargeFileHelper.php
+++ b/lib/private/LargeFileHelper.php
@@ -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 {